Spaces:
Runtime error
Runtime error
Download backend/Dockerfile from KrishBh/satquery-backend: direct link, hf CLI and curl.
- Browser
- Download file 798 Bytes
-
https://huggingface.co/spaces/KrishBh/satquery-backend/resolve/main/backend/Dockerfile
- Command line
-
hf download hf://spaces/KrishBh/satquery-backend/backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/KrishBh/satquery-backend/resolve/main/backend/Dockerfile
798 Bytes
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # Install system dependencies needed for OpenCV, PIL, and PyTorch | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy dependency specifications | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt && \ | |
| pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu && \ | |
| pip install --no-cache-dir open_clip_torch google-genai pillow numpy | |
| # Copy backend code | |
| COPY . /app/backend | |
| WORKDIR /app/backend | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=8000 | |
| EXPOSE 8000 | |
| CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-8000}"] | |