Skip to content

Commit 76a99a9

Browse files
committed
build: use cpu-only torch to reduce image size and fix CI build
1 parent 1c458f0 commit 76a99a9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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)