Download Dockerfile from Jethro85/DPSGDTool: direct link, hf CLI and curl.
- Browser
- Download file 716 Bytes
-
https://huggingface.co/spaces/Jethro85/DPSGDTool/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Jethro85/DPSGDTool/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Jethro85/DPSGDTool/resolve/main/Dockerfile
716 Bytes
| # Dockerfile | |
| FROM python:3.10-slim | |
| # Build tools | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Upgrade pip toolchain and preinstall deps that unblock tf-models-official | |
| RUN pip install --no-cache-dir --upgrade pip setuptools wheel \ | |
| && pip install --no-cache-dir "Cython<3" | |
| # Then install your requirements | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # App code | |
| COPY . /app | |
| ENV PORT=7860 PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| # Gunicorn loads Flask app from run.py | |
| CMD ["sh", "-c", "exec gunicorn run:app --workers 2 --threads 8 --timeout 120 --bind 0.0.0.0:${PORT:-7860}"] |