Spaces:
Running
Running
Download Dockerfile from sharpflowapp/web: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/spaces/sharpflowapp/web/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sharpflowapp/web/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sharpflowapp/web/resolve/main/Dockerfile
736 Bytes
| # Hugging Face Spaces runs this as the container entrypoint (sdk: docker). | |
| # HF exposes port 7860 and runs the container as a non-root user (uid 1000), | |
| # so we install deps as root, then chown the app so runtime writes (e.g. the | |
| # subscribers CSV) don't hit a permission error. | |
| FROM python:3.11-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| MPLCONFIGDIR=/tmp/mpl \ | |
| PORT=7860 | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| RUN useradd -m -u 1000 appuser \ | |
| && mkdir -p /app/data \ | |
| && chown -R appuser:appuser /app | |
| USER appuser | |
| EXPOSE 7860 | |
| CMD ["gunicorn", "webapp.app:app", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "4", "--timeout", "120"] | |