fix: 修改torch依赖版本

This commit is contained in:
shaohuzhang1 2024-03-26 17:24:20 +08:00
parent 1c68c53f18
commit e60f08b352
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ RUN python3 -m venv /opt/py3 && \
pip install poetry --break-system-packages && \
poetry config virtualenvs.create false && \
. /opt/py3/bin/activate && \
if [ "$(uname -m)" != "x86_64" ]; then sed -i '/^torch/d' pyproject.toml; fi && \
if [ "$(uname -m)" = "x86_64" ]; then sed -i 's/^torch.*/torch = {version = "^2.2.1+cpu", source = "pytorch"}/g' pyproject.toml; fi && \
poetry install
FROM ghcr.io/1panel-dev/maxkb-python-pg:python3.11-pg15.6

View File

@ -18,7 +18,7 @@ diskcache = "^5.6.3"
pillow = "^10.2.0"
filetype = "^1.2.0"
chardet = "^5.2.0"
torch = {version = "^2.2.1+cpu", source = "pytorch"}
torch = "^2.2.1"
sentence-transformers = "^2.2.2"
blinker = "^1.6.3"
openai = "^1.13.3"