YashashMathur commited on
Commit
ff9091d
·
verified ·
1 Parent(s): ce8daf0

fix: upgrade PyTorch to 2.5.1 to fix unsloth_zoo AttributeError on torch._inductor.config

Browse files
Files changed (1) hide show
  1. hf_training/Dockerfile +6 -0
hf_training/Dockerfile CHANGED
@@ -5,6 +5,12 @@ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
5
 
6
  WORKDIR /app
7
 
 
 
 
 
 
 
8
  # Install Unsloth and training dependencies
9
  RUN pip install --no-cache-dir \
10
  "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" \
 
5
 
6
  WORKDIR /app
7
 
8
+ # Upgrade PyTorch to 2.5.1 (cu121) — unsloth_zoo requires torch._inductor.config
9
+ # which only became an accessible attribute in PyTorch 2.4+
10
+ RUN pip install --upgrade --no-cache-dir \
11
+ torch==2.5.1 torchvision torchaudio \
12
+ --index-url https://download.pytorch.org/whl/cu121
13
+
14
  # Install Unsloth and training dependencies
15
  RUN pip install --no-cache-dir \
16
  "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" \