Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # System deps required by opencv | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # CPU-only PyTorch first (avoids pulling the large CUDA variant) | |
| RUN pip install --no-cache-dir \ | |
| torch torchvision \ | |
| --index-url https://download.pytorch.org/whl/cpu | |
| # Remaining Python deps | |
| RUN pip install --no-cache-dir \ | |
| bokeh \ | |
| numpy \ | |
| opencv-python \ | |
| pillow \ | |
| matplotlib \ | |
| transformers \ | |
| huggingface_hub \ | |
| google-genai | |
| # App source — only the two files actually used at serve time | |
| COPY scripts/explorer_app.py /app/scripts/explorer_app.py | |
| COPY src/clip_utils.py /app/src/clip_utils.py | |
| COPY entrypoint.sh /app/entrypoint.sh | |
| RUN chmod +x /app/entrypoint.sh | |
| EXPOSE 7860 | |
| CMD ["/app/entrypoint.sh"] | |