natnael kahssay Claude Sonnet 4.6 commited on
Commit
71a483e
·
1 Parent(s): ada7c70

fix: install trl>=0.16 last with --upgrade to beat unsloth dep pins

Browse files

unsloth can resolve trl to an older version when installed together,
leaving the conda base's old TRL (which imports GuidedDecodingParams
from vllm.sampling_params — removed in vllm 0.12). Installing TRL
separately at the end with --upgrade ensures 0.16+ wins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. training/Dockerfile +5 -2
training/Dockerfile CHANGED
@@ -4,11 +4,10 @@ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
4
 
5
  RUN pip install --upgrade pip
6
 
7
- # Pin vLLM to version TRL supports, install unsloth
8
  RUN pip install --no-cache-dir \
9
  "vllm==0.12.0" \
10
  unsloth \
11
- "trl>=0.16.0" \
12
  transformers \
13
  accelerate \
14
  datasets \
@@ -16,6 +15,10 @@ RUN pip install --no-cache-dir \
16
  peft \
17
  wandb
18
 
 
 
 
 
19
  WORKDIR /app
20
  COPY train.py .
21
  COPY train_rfc005.py .
 
4
 
5
  RUN pip install --upgrade pip
6
 
7
+ # Install vllm, unsloth, and base deps first
8
  RUN pip install --no-cache-dir \
9
  "vllm==0.12.0" \
10
  unsloth \
 
11
  transformers \
12
  accelerate \
13
  datasets \
 
15
  peft \
16
  wandb
17
 
18
+ # Install TRL last with --upgrade so it is not pinned down by unsloth deps
19
+ # trl>=0.16 dropped the GuidedDecodingParams import that broke on vllm 0.12
20
+ RUN pip install --upgrade --no-cache-dir "trl>=0.16.0"
21
+
22
  WORKDIR /app
23
  COPY train.py .
24
  COPY train_rfc005.py .