From f95d5efbf7fafeedfa57fac4ba15a2fdbe3bbd9b Mon Sep 17 00:00:00 2001 From: DJP Date: Mon, 23 Feb 2026 22:16:58 -0500 Subject: [PATCH] Fix Docker build: add missing deps and .dockerignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace deprecated libgl1-mesa-glx with libgl1 (Debian Trixie) - Add CLIP, einops, ftfy, regex dependencies for DeepGaze models - Add backend .dockerignore to exclude .venv (128MB → 1.6MB context) - Update Makefile with CLIP install step - All 3 models load successfully in Docker Co-Authored-By: Claude Opus 4.6 --- Makefile | 1 + backend/.dockerignore | 6 ++++++ backend/Dockerfile | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 backend/.dockerignore diff --git a/Makefile b/Makefile index 4b07ef9..3b6238a 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ setup-backend: cd backend && .venv/bin/pip install --upgrade pip cd backend && .venv/bin/pip install -e ".[dev]" cd backend && .venv/bin/pip install "deepgaze-pytorch @ git+https://github.com/matthias-k/DeepGaze.git" + cd backend && .venv/bin/pip install "clip @ git+https://github.com/openai/CLIP.git" setup-frontend: cd frontend && npm install diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 0000000..da70732 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,6 @@ +.venv +__pycache__ +*.pyc +data/ +.env +.pytest_cache diff --git a/backend/Dockerfile b/backend/Dockerfile index 8e6e28a..1c539ee 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -3,7 +3,7 @@ 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 && \ + libgl1 libglib2.0-0 curl git && \ rm -rf /var/lib/apt/lists/* # Copy dependency spec first for layer caching @@ -11,6 +11,8 @@ COPY pyproject.toml . # Install dependencies (non-editable, just deps) RUN pip install --no-cache-dir . && \ + pip install --no-cache-dir einops ftfy regex && \ + pip install --no-cache-dir "clip @ git+https://github.com/openai/CLIP.git" && \ pip install --no-cache-dir "deepgaze-pytorch @ git+https://github.com/matthias-k/DeepGaze.git" # Copy application source