Fix PyTorch/TorchVision compatibility: use exact versions 2.6.0/0.21.0
Browse files- Dockerfile +2 -2
- requirements.txt +1 -1
Dockerfile
CHANGED
|
@@ -22,8 +22,8 @@ WORKDIR /app
|
|
| 22 |
# Copy requirements
|
| 23 |
COPY requirements.txt .
|
| 24 |
|
| 25 |
-
# Install PyTorch 2.6
|
| 26 |
-
RUN pip install torch
|
| 27 |
|
| 28 |
# Skip llama-cpp-python to avoid compilation - using transformers instead
|
| 29 |
|
|
|
|
| 22 |
# Copy requirements
|
| 23 |
COPY requirements.txt .
|
| 24 |
|
| 25 |
+
# Install PyTorch 2.6.0 with compatible TorchVision 0.21.0 to fix CVE-2025-32434
|
| 26 |
+
RUN pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu121
|
| 27 |
|
| 28 |
# Skip llama-cpp-python to avoid compilation - using transformers instead
|
| 29 |
|
requirements.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
fastapi==0.104.1
|
| 2 |
uvicorn[standard]==0.24.0
|
| 3 |
pydantic==2.5.0
|
| 4 |
-
torch
|
| 5 |
transformers>=4.35.0
|
| 6 |
accelerate>=0.24.0
|
| 7 |
bitsandbytes>=0.41.0
|
|
|
|
| 1 |
fastapi==0.104.1
|
| 2 |
uvicorn[standard]==0.24.0
|
| 3 |
pydantic==2.5.0
|
| 4 |
+
torch==2.6.0
|
| 5 |
transformers>=4.35.0
|
| 6 |
accelerate>=0.24.0
|
| 7 |
bitsandbytes>=0.41.0
|