Spaces:
Sleeping
Sleeping
Download Dockerfile from AthithyaLogan/SAMSpade: direct link, hf CLI and curl.
- Browser
- Download file 842 Bytes
-
https://huggingface.co/spaces/AthithyaLogan/SAMSpade/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AthithyaLogan/SAMSpade/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AthithyaLogan/SAMSpade/resolve/main/Dockerfile
842 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # System deps — GDAL, OpenCV, build tools | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc g++ \ | |
| libgdal-dev gdal-bin \ | |
| libspatialindex-dev \ | |
| libglib2.0-0 libsm6 libxrender1 libxext6 \ | |
| git curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Torch with CUDA 12.1 (separate layer for better caching) | |
| RUN pip install --no-cache-dir \ | |
| torch torchvision \ | |
| --index-url https://download.pytorch.org/whl/cu121 | |
| # App dependencies | |
| COPY requirements_hf.txt . | |
| RUN pip install --no-cache-dir -r requirements_hf.txt | |
| # Copy application | |
| COPY . . | |
| # HF Spaces requires port 7860 | |
| EXPOSE 7860 | |
| ENV PYTHONPATH=/app \ | |
| HF_HOME=/app/.cache/huggingface | |
| CMD ["python", "-m", "uvicorn", "dashboard.app:app", "--host", "0.0.0.0", "--port", "7860"] | |