修复 torch 安装:使用 extra-index-url 替代直接 URL

This commit is contained in:
2569718930@qq.com
2026-06-16 02:04:52 +08:00
parent 6d7f213cd9
commit eb5579dbbd
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.lock -r requirements-dev.lock
pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.lock -r requirements-dev.lock
- name: Ruff
run: python -m ruff check .
+1 -1
View File
@@ -18,7 +18,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
COPY requirements.lock .
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --prefer-binary -r requirements.lock
pip install --prefer-binary --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.lock
COPY . .
+1 -1
View File
@@ -110,7 +110,7 @@ netcdf4==1.7.4
# via -r requirements.txt
numpy==2.4.6
torch @ https://download.pytorch.org/whl/cpu/torch-2.5.1%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version >= "3.11"
torch
typing_extensions==4.15.0
# via torch
# via