Skip to content

Commit 6bfaa30

Browse files
authored
Merge pull request #443 from CodeForPhilly/ci/cd-refactor
build: use cpu-only torch to reduce image size and fix CI build
2 parents 4942546 + 76a99a9 commit 6bfaa30

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile.prod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ ENV PYTHONUNBUFFERED=1
3232
RUN apt-get update && apt-get install -y netcat && rm -rf /var/lib/apt/lists/*
3333

3434
# Install Python dependencies
35-
RUN pip install --upgrade pip
35+
RUN pip install --upgrade pip --no-cache-dir
3636
COPY server/requirements.txt .
37-
RUN pip install -r requirements.txt
37+
# Install CPU-only torch to save space (avoids ~4GB of CUDA libs)
38+
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu --no-cache-dir
39+
RUN pip install -r requirements.txt --no-cache-dir
3840

3941
# Copy backend application code
4042
COPY server/ .

0 commit comments

Comments
 (0)