chore(依赖): 调整模型依赖安装方式
将 torch 与 transformers 纳入默认运行依赖,并让 Docker 镜像安装完整项目依赖。
This commit is contained in:
1 parent
ca146c1464
commit
f905aa22cc
2 files changed
+3
-2
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ COPY middleware ./middleware
|
||||
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
--trusted-host pypi.tuna.tsinghua.edu.cn \
|
||||
--default-timeout=60 --no-cache-dir \
|
||||
".[guard]"
|
||||
.
|
||||
COPY config.yaml ./
|
||||
COPY plugins ./plugins
|
||||
ENV HF_HUB_OFFLINE=1
|
||||
|
||||
+2
-1
@@ -13,11 +13,12 @@ dependencies = [
|
||||
"PyYAML==6.0.3",
|
||||
"lupa==2.8",
|
||||
"uvicorn>=0.35,<1",
|
||||
"torch>=2.2",
|
||||
"transformers>=4.51,<5"
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = ["pytest>=8,<10", "pytest-asyncio>=1,<2", "httpx>=0.28,<1", "ruff>=0.14,<1"]
|
||||
guard = ["torch>=2.2", "transformers>=4.51,<5"]
|
||||
|
||||
[project.scripts]
|
||||
agent-safe-middleware = "middleware.cli:main"
|
||||
|
||||
Reference in new issue
Block a user