apook Claude Sonnet 4.6 commited on
Commit
bbb17d7
·
1 Parent(s): 10c720b

Bump torch to 2.6.0+cpu — required for torch.load on .bin model weights

Browse files

CVE-2025-32434: transformers raises ValueError when loading pickle-based
.bin weights (ClinicalBERT, chest ViT) with torch < 2.6. Models using
safetensors (google/vit-base-patch16-224) were unaffected. Upgrade to
torch 2.6.0+cpu / torchvision 0.21.0+cpu to satisfy the requirement.

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

Files changed (2) hide show
  1. Dockerfile +1 -1
  2. requirements.txt +2 -2
Dockerfile CHANGED
@@ -19,7 +19,7 @@ RUN grep -vE "^(torch|torchvision)" requirements.txt | \
19
  # no choice but to install the CPU build. Running this after step 1 means
20
  # nothing can overwrite it.
21
  RUN pip install --no-cache-dir \
22
- torch==2.4.0+cpu torchvision==0.19.0+cpu \
23
  --index-url https://download.pytorch.org/whl/cpu
24
 
25
  # Step 3: smoke test — if torch cannot be imported the build fails here
 
19
  # no choice but to install the CPU build. Running this after step 1 means
20
  # nothing can overwrite it.
21
  RUN pip install --no-cache-dir \
22
+ torch==2.6.0+cpu torchvision==0.21.0+cpu \
23
  --index-url https://download.pytorch.org/whl/cpu
24
 
25
  # Step 3: smoke test — if torch cannot be imported the build fails here
requirements.txt CHANGED
@@ -8,8 +8,8 @@ huggingface_hub>=0.23.0
8
  sentence-transformers>=2.7.0
9
  transformers>=4.40.0
10
  # Installed from PyTorch CPU wheel server in Dockerfile (see step 2)
11
- torch==2.4.0+cpu
12
- torchvision==0.19.0+cpu
13
 
14
  # Image processing
15
  Pillow>=10.0.0
 
8
  sentence-transformers>=2.7.0
9
  transformers>=4.40.0
10
  # Installed from PyTorch CPU wheel server in Dockerfile (see step 2)
11
+ torch==2.6.0+cpu
12
+ torchvision==0.21.0+cpu
13
 
14
  # Image processing
15
  Pillow>=10.0.0