hirann commited on
Commit
b4d5b33
·
verified ·
1 Parent(s): 2af531a

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -14
Dockerfile CHANGED
@@ -1,23 +1,16 @@
1
- FROM nvidia/cuda:12.1.0-devel-ubuntu22.04
2
-
3
- RUN apt-get update && apt-get install -y python3-pip python3-dev git build-essential && rm -rf /var/lib/apt/lists/*
4
 
5
  WORKDIR /app
6
 
7
- # Force specific compatible versions of torch and torchvision
8
- RUN pip3 install --no-cache-dir torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121
9
-
10
  COPY ./requirements.txt requirements.txt
11
- COPY ./requirements-training.txt requirements-training.txt
12
-
13
- # Install other dependencies
14
- RUN pip3 install --no-cache-dir --upgrade -r requirements.txt
15
- RUN pip3 install --no-cache-dir --upgrade -r requirements-training.txt
16
 
17
- # Install Unsloth
18
- RUN pip3 install --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
19
 
20
  COPY . /app
21
 
22
  ENV PYTHONPATH="/app"
23
- CMD ["python3", "training/launch_hf_training.py"]
 
1
+ FROM unsloth/unsloth:latest
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # The unsloth image already has torch, torchvision, unsloth, etc.
6
+ # We only install project-specific dependencies.
 
7
  COPY ./requirements.txt requirements.txt
8
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
9
 
10
+ # Ensure TRL is new enough for GRPO
11
+ RUN pip install --no-cache-dir --upgrade "trl>=0.15.0"
12
 
13
  COPY . /app
14
 
15
  ENV PYTHONPATH="/app"
16
+ CMD ["python", "training/launch_hf_training.py"]