Download Dockerfile from xjackkx/g2: direct link, hf CLI and curl.
- Browser
- Download file 592 Bytes
-
https://huggingface.co/spaces/xjackkx/g2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/xjackkx/g2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/xjackkx/g2/resolve/main/Dockerfile
592 Bytes
| FROM python:3.12-slim | |
| # Non-root user (Hugging Face Spaces requirement) | |
| RUN groupadd -r appuser && useradd -r -g appuser -m appuser | |
| WORKDIR /app | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY gemini_web2api/ ./gemini_web2api/ | |
| COPY entrypoint.sh /entrypoint.sh | |
| RUN chmod +x /entrypoint.sh \ | |
| && chown -R appuser:appuser /app | |
| # HF Spaces free tier requires listening on 7860. | |
| # Local Docker: map host 8081 -> container 7860, or set PORT=8081. | |
| ENV PORT=7860 \ | |
| HOST=0.0.0.0 \ | |
| PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| USER appuser | |
| CMD ["/entrypoint.sh"] | |