File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,9 +11,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1111 libpq-dev \
1212 && rm -rf /var/lib/apt/lists/*
1313
14- # Copy requirements and install dependencies
14+ # Copy requirements and build wheels
15+ # Note: We build wheels WITH dependencies to ensure all packages can build correctly
16+ # The --no-deps flag can fail for packages that need dependencies during build
1517COPY backend/requirements.txt .
16- RUN pip wheel --no-cache-dir --no-deps -- wheel-dir /build/wheels -r requirements.txt
18+ RUN pip wheel --no-cache-dir --wheel-dir /build/wheels -r requirements.txt
1719
1820# Production image
1921FROM python:3.11-slim
@@ -39,9 +41,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3941WORKDIR /app
4042
4143# Copy wheels from builder and install
44+ # Install from wheels directory - pip will resolve dependencies from wheels
4245COPY --from=builder /build/wheels /wheels
4346COPY --from=builder /build/requirements.txt .
44- RUN pip install --no-cache /wheels/*
47+ RUN pip install --no-cache-dir --find-links /wheels -r requirements.txt
4548
4649# Copy application code
4750COPY --chown=appuser:appuser backend/app ./app
You can’t perform that action at this time.
0 commit comments