olivas/backend/Dockerfile
DJP 2425cd2677 Fix Docker and install files for current codebase
- Fix backend Dockerfile: install deps before copying source for
  proper layer caching (non-editable install)
- Add ai_insights, ai_score, ai_score_reason, ai_cost_usd columns
  to initial Alembic migration so fresh Docker deploys have full schema
- Add ANTHROPIC_API_KEY to docker-compose.yml, docker-compose.dev.yml,
  and .env.example
- Remove accidental backend/=0.40 pip artifact file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:54:41 -05:00

22 lines
587 B
Docker

FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1-mesa-glx libglib2.0-0 curl git && \
rm -rf /var/lib/apt/lists/*
# Copy dependency spec first for layer caching
COPY pyproject.toml .
# Install dependencies (non-editable, just deps)
RUN pip install --no-cache-dir . && \
pip install --no-cache-dir "deepgaze-pytorch @ git+https://github.com/matthias-k/DeepGaze.git"
# Copy application source
COPY . .
RUN mkdir -p data/uploads
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]