Skip to content

Commit e60f08b

Browse files
committed
fix: 修改torch依赖版本
1 parent 1c68c53 commit e60f08b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

installer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN python3 -m venv /opt/py3 && \
2525
pip install poetry --break-system-packages && \
2626
poetry config virtualenvs.create false && \
2727
. /opt/py3/bin/activate && \
28-
if [ "$(uname -m)" != "x86_64" ]; then sed -i '/^torch/d' pyproject.toml; fi && \
28+
if [ "$(uname -m)" = "x86_64" ]; then sed -i 's/^torch.*/torch = {version = "^2.2.1+cpu", source = "pytorch"}/g' pyproject.toml; fi && \
2929
poetry install
3030

3131
FROM ghcr.io/1panel-dev/maxkb-python-pg:python3.11-pg15.6

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ diskcache = "^5.6.3"
1818
pillow = "^10.2.0"
1919
filetype = "^1.2.0"
2020
chardet = "^5.2.0"
21-
torch = {version = "^2.2.1+cpu", source = "pytorch"}
21+
torch = "^2.2.1"
2222
sentence-transformers = "^2.2.2"
2323
blinker = "^1.6.3"
2424
openai = "^1.13.3"

0 commit comments

Comments
 (0)