Spaces:
Sleeping
Sleeping
Download Dockerfile from kchromatic3/mdmf-api: direct link, hf CLI and curl.
- Browser
- Download file 613 Bytes
-
https://huggingface.co/spaces/kchromatic3/mdmf-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/kchromatic3/mdmf-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kchromatic3/mdmf-api/resolve/main/Dockerfile
613 Bytes
| FROM python:3.10-slim | |
| # System deps for opencv-headless and torch | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Tell torch.hub where to cache DINOv2 so it persists across rebuilds | |
| ENV TORCH_HOME=/app/.torch_cache | |
| ENV HF_HOME=/app/.hf_cache | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] | |