diff --git a/.github/workflows/build-and-push-python-pg.yml b/.github/workflows/build-and-push-python-pg.yml index d82ca86bd..8ff9d692a 100644 --- a/.github/workflows/build-and-push-python-pg.yml +++ b/.github/workflows/build-and-push-python-pg.yml @@ -10,8 +10,8 @@ on: type: choice options: - linux/amd64 - - linux/arm64 - - linux/amd64,linux/arm64 + #- linux/arm64 + #- linux/amd64,linux/arm64 jobs: build-and-push-python-pg-to-ghcr: runs-on: ubuntu-latest diff --git a/.github/workflows/build-and-push-vector-model.yml b/.github/workflows/build-and-push-vector-model.yml index 1e8556461..b81eea6e0 100644 --- a/.github/workflows/build-and-push-vector-model.yml +++ b/.github/workflows/build-and-push-vector-model.yml @@ -14,8 +14,8 @@ on: type: choice options: - linux/amd64 - - linux/arm64 - - linux/amd64,linux/arm64 + #- linux/arm64 + #- linux/amd64,linux/arm64 jobs: build-and-push-vector-model-to-ghcr: diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index b1102252e..6f0b6047e 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -14,8 +14,8 @@ on: type: choice options: - linux/amd64 - - linux/arm64 - - linux/amd64,linux/arm64 + #- linux/arm64 + #- linux/amd64,linux/arm64 registry: description: 'Push To Registry' required: true diff --git a/apps/smartdoc/conf.py b/apps/smartdoc/conf.py index aa90d2134..855b507a1 100644 --- a/apps/smartdoc/conf.py +++ b/apps/smartdoc/conf.py @@ -13,7 +13,6 @@ import os import re from importlib import import_module from urllib.parse import urljoin, urlparse -import torch.backends import yaml BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -91,7 +90,7 @@ class Config(dict): "EMAIL_HOST_PASSWORD": "", # 向量模型 "EMBEDDING_MODEL_NAME": "shibing624/text2vec-base-chinese", - "EMBEDDING_DEVICE": "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu", + "EMBEDDING_DEVICE": "cpu", "EMBEDDING_MODEL_PATH": os.path.join(PROJECT_DIR, 'models'), # 向量库配置 "VECTOR_STORE_NAME": 'pg_vector' diff --git a/pyproject.toml b/pyproject.toml index cd9fea832..9c3a03af2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ diskcache = "^5.6.3" pillow = "^10.2.0" filetype = "^1.2.0" chardet = "^5.2.0" +torch = { url = "https://download.pytorch.org/whl/cpu/torch-2.2.1%2Bcpu-cp311-cp311-linux_x86_64.whl", markers = "sys_platform == 'linux'"} sentence-transformers = "^2.2.2" blinker = "^1.6.3" openai = "^1.13.3"