t29mato Claude Opus 4.6 commited on
Commit
c6b46e4
·
1 Parent(s): 2d204ac

Fix PyTorch install URL: use --extra-index-url for CPU wheels

Browse files

The -f torch_stable.html URL didn't have the correct CPU wheels.
Switch to --extra-index-url https://download.pytorch.org/whl/cpu
which is the official way to install PyTorch CPU-only.

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

Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.10-slim
2
 
3
- # System dependencies
4
  RUN apt-get update && apt-get install -y \
5
  libgl1-mesa-glx \
6
  libglib2.0-0 \
@@ -10,16 +10,16 @@ RUN apt-get update && apt-get install -y \
10
 
11
  WORKDIR /app
12
 
13
- # Install PyTorch CPU first
14
  RUN pip install --no-cache-dir \
15
  torch==1.13.1+cpu \
16
  torchvision==0.14.1+cpu \
17
- -f https://download.pytorch.org/whl/cpu/torch_stable.html
18
 
19
- # Install mmcv (lite version - no C++ ops needed)
20
  RUN pip install --no-cache-dir mmcv==1.7.2
21
 
22
- # Copy and run mmcv.ops shim setup
23
  COPY setup_mmcv_shim.py .
24
  RUN python setup_mmcv_shim.py
25
 
 
1
  FROM python:3.10-slim
2
 
3
+ # System dependencies (gcc/g++ needed for pycocotools)
4
  RUN apt-get update && apt-get install -y \
5
  libgl1-mesa-glx \
6
  libglib2.0-0 \
 
10
 
11
  WORKDIR /app
12
 
13
+ # Install PyTorch CPU first (use --extra-index-url for CPU wheels)
14
  RUN pip install --no-cache-dir \
15
  torch==1.13.1+cpu \
16
  torchvision==0.14.1+cpu \
17
+ --extra-index-url https://download.pytorch.org/whl/cpu
18
 
19
+ # Install mmcv (lite version - pure Python, no C++ compilation)
20
  RUN pip install --no-cache-dir mmcv==1.7.2
21
 
22
+ # Create mmcv.ops shim using torchvision
23
  COPY setup_mmcv_shim.py .
24
  RUN python setup_mmcv_shim.py
25