| # Multimodal Semantic Image-Text Retrieval System | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system deps for PIL/torch | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app/ ./app/ | |
| COPY scripts/ ./scripts/ | |
| ENV PYTHONPATH=/app | |
| ENV PORT=8000 | |
| EXPOSE $PORT | |
| # Create data dir and run scripts on startup | |
| CMD ["sh", "-c", "mkdir -p ./data/images && python scripts/create_sample_data.py --count 2000 && python scripts/index_dataset.py && uvicorn app.main:app --host 0.0.0.0 --port 7860"] | |