shank commited on
Commit
db12eaa
·
1 Parent(s): dc7eb3f

Fix: Fixed dependancy issues

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -2
  2. requirements.txt +4 -3
Dockerfile CHANGED
@@ -1,11 +1,12 @@
1
- FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
  # Install curl for healthcheck
6
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
7
 
8
- # Install dependencies first (layer cache optimization)
 
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
 
1
+ FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
2
 
3
  WORKDIR /app
4
 
5
  # Install curl for healthcheck
6
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
7
 
8
+ # torch + CUDA 12.1 + cuDNN 8 are already in the base image.
9
+ # requirements.txt installs only the remaining app-level deps.
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
- # torch must be installed at build time (CUDA wheel is ~2GB, too slow at runtime)
2
- # Everything else is installed at runtime in training/train_grpo.py
3
- torch
 
 
1
+ # torch, CUDA 12.1, and cuDNN 8 are pre-installed in the base image:
2
+ # pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
3
+ # Do NOT add torch here — pip would resolve to the CPU wheel from default PyPI
4
+ # and overwrite the CUDA-enabled torch from the base image.