From b0fc20cfed5c925b57b70f86782f8c06699e3539 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 21 Mar 2024 14:48:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=9D=E8=AF=95=E5=8E=BB?= =?UTF-8?q?=E6=8E=89nvidia=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/Dockerfile | 1 + pyproject.toml | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/installer/Dockerfile b/installer/Dockerfile index 0f3598878..6d88fc20d 100644 --- a/installer/Dockerfile +++ b/installer/Dockerfile @@ -24,6 +24,7 @@ RUN mv /opt/maxkb/app/model/* /opt/maxkb/model && \ apt-get update && apt-get install -y curl && \ pip3 install --upgrade pip && \ pip3 install poetry && \ + if [ `uname -m` == "aarch64" ]; then sed -i '/^torch/d' pyproject.toml; fi && \ poetry export -f requirements.txt --output requirements.txt --without-hashes && \ pip3 install --no-cache-dir -r requirements.txt && \ pip3 cache purge && \ diff --git a/pyproject.toml b/pyproject.toml index 36281841a..268c23c96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,12 +18,7 @@ diskcache = "^5.6.3" pillow = "^10.2.0" filetype = "^1.2.0" chardet = "^5.2.0" -torch = [ - { version = "^2.2.1+cpu", markers = "platform_system == 'Linux' and platform_machine == 'x86_64'", source = "pytorch" }, - { version = "^2.2.1", markers = "platform_system == 'Linux' and platform_machine == 'aarch64'", source = "pytorch" }, - { version = "^2.2.1+cpu", markers = "platform_system == 'Windows'", source = "pytorch" }, - { version = "^2.2.1", markers = "platform_system == 'Darwin'", source = "pytorch" } -] +torch = {version = "^2.2.1+cpu", source = "pytorch"} sentence-transformers = "^2.2.2" blinker = "^1.6.3" openai = "^1.13.3"