| FROM python:3.12.11-slim | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| ENV XDG_CACHE_HOME=/home/user/.cache | |
| ENV HF_HOME=/home/user/.cache | |
| ENV TORCH_HOME=/home/user/.cache/torch | |
| RUN python -c "from chromadb.utils.embedding_functions import OpenCLIPEmbeddingFunction; OpenCLIPEmbeddingFunction()" | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |