Download Dockerfile from AIMaster7/TST: direct link, hf CLI and curl.
- Browser
- Download file 855 Bytes
-
https://huggingface.co/spaces/AIMaster7/TST/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AIMaster7/TST/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AIMaster7/TST/resolve/main/Dockerfile
855 Bytes
| # ---------- base image ---------- | |
| FROM python:3.11-slim | |
| # ---------- runtime options ---------- | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| LOG_LEVEL=INFO \ | |
| WORKERS=4 | |
| # ---------- install system deps ---------- | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential curl && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # ---------- install Python deps ---------- | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ---------- copy source ---------- | |
| COPY . . | |
| # ---------- network ---------- | |
| EXPOSE 8000 | |
| # ---------- healthcheck ---------- | |
| HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD \ | |
| curl -sf http://localhost:8000/health || exit 1 | |
| # ---------- start ---------- | |
| CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port 8000 --workers $WORKERS"] |