File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,10 +33,16 @@ COPY backend/pyproject.toml backend/README.md ./backend/
3333COPY backend/syft_space/__init__.py ./backend/syft_space/
3434
3535ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
36+
37+ # 1. Install base deps (fast, frequently cached)
3638RUN uv venv /app/.venv --python python${PYTHON_VERSION} && \
3739 uv pip install --python /app/.venv/bin/python -e "./backend"
3840
39- # Install heavy optional deps separately (slower, but cached independently)
41+ # 2. Install CPU-only PyTorch (avoids 4GB+ CUDA packages)
42+ RUN uv pip install --python /app/.venv/bin/python \
43+ torch torchvision --index-url https://download.pytorch.org/whl/cpu
44+
45+ # 3. Install heavy optional deps (docling will use existing torch)
4046RUN uv pip install --python /app/.venv/bin/python -e "./backend[libs]"
4147
4248# ============================================================================
You can’t perform that action at this time.
0 commit comments