Download Dockerfile from omvyas77/uplift: direct link, hf CLI and curl.
- Browser
- Download file 923 Bytes
-
https://huggingface.co/spaces/omvyas77/uplift/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/omvyas77/uplift/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/omvyas77/uplift/resolve/main/Dockerfile
923 Bytes
| FROM python:3.12-slim | |
| # HF Spaces run as uid 1000. Creating the user explicitly keeps file ownership | |
| # sane and avoids Streamlit trying to write config into a root-owned home. | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR $HOME/app | |
| COPY --chown=user requirements.txt ./ | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| COPY --chown=user app.py ./ | |
| COPY --chown=user src/ src/ | |
| COPY --chown=user evals/ evals/ | |
| # 7860 is the port HF Spaces expects; app_port in the README frontmatter must | |
| # match. Headless + no CORS is required for the Space's reverse proxy. | |
| EXPOSE 7860 | |
| CMD ["streamlit", "run", "app.py", \ | |
| "--server.port=7860", \ | |
| "--server.address=0.0.0.0", \ | |
| "--server.headless=true", \ | |
| "--server.enableCORS=false", \ | |
| "--server.enableXsrfProtection=false", \ | |
| "--browser.gatherUsageStats=false"] | |