Download Dockerfile.gpu from pstic/spatialthings-depth-pro-free-cpu: direct link, hf CLI and curl.
- Browser
- Download file 771 Bytes
-
https://huggingface.co/spaces/pstic/spatialthings-depth-pro-free-cpu/resolve/main/Dockerfile.gpu
- Command line
-
hf download hf://spaces/pstic/spatialthings-depth-pro-free-cpu/Dockerfile.gpu
-
curl -L -o Dockerfile.gpu https://huggingface.co/spaces/pstic/spatialthings-depth-pro-free-cpu/resolve/main/Dockerfile.gpu
771 Bytes
| FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PORT=8000 \ | |
| DEPTH_PRO_MODEL_ID=/repository \ | |
| DEPTH_PRO_DEVICE=auto \ | |
| DEPTH_PRO_DTYPE=auto \ | |
| DEPTH_PRO_EAGER_LOAD=true \ | |
| MAX_IMAGE_BYTES=16777216 \ | |
| HF_XET_HIGH_PERFORMANCE=1 | |
| WORKDIR /app | |
| RUN useradd -m -u 1000 appuser | |
| COPY requirements.txt . | |
| RUN python -m pip install --upgrade pip \ | |
| && python -m pip install --index-url https://download.pytorch.org/whl/cu124 torchvision==0.20.1 \ | |
| && python -m pip install -r requirements.txt | |
| COPY main.py . | |
| COPY smoke_test.py . | |
| RUN chown -R appuser:appuser /app | |
| USER appuser | |
| EXPOSE 8000 | |
| CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-8000}"] | |