Skip to content

Commit b9fcd68

Browse files
build: try uv.
1 parent 354f85d commit b9fcd68

File tree

2 files changed

+70
-85
lines changed

2 files changed

+70
-85
lines changed

installer/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ COPY --chmod=700 . /opt/maxkb-app
2121
WORKDIR /opt/maxkb-app
2222
RUN rm -rf /opt/maxkb-app/ui && \
2323
python3 -m venv /opt/py3 && \
24-
pip install poetry==2.0.0 --break-system-packages && \
25-
poetry config virtualenvs.create false && \
24+
pip install uv --break-system-packages && \
2625
. /opt/py3/bin/activate && \
27-
poetry install && \
26+
uv sync && \
2827
find /opt/maxkb-app -depth \( -name ".git*" -o -name ".docker*" -o -name ".idea*" -o -name ".editorconfig*" -o -name ".prettierrc*" -o -name "README.md" -o -name "poetry.lock" -o -name "pyproject.toml" \) -exec rm -rf {} + && \
2928
export MAXKB_CONFIG_TYPE=ENV && python3 /opt/maxkb-app/apps/manage.py compilemessages && \
3029
export PIP_TARGET=/opt/maxkb-app/sandbox/python-packages && \

pyproject.toml

Lines changed: 68 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,79 @@
1-
[tool.poetry]
1+
[project]
22
name = "maxkb"
33
version = "2.0.0"
44
description = "强大易用的开源企业级智能体平台"
5-
authors = ["shaohuzhang1 <[email protected]>"]
5+
authors = [{ name = "shaohuzhang1", email = "[email protected]" }]
6+
requires-python = "~=3.11.0"
67
readme = "README.md"
7-
package-mode = false
8-
9-
[tool.poetry.dependencies]
10-
python = "^3.11"
8+
dependencies = [
9+
"django==5.2.4",
10+
"drf-spectacular[sidecar]==0.28.0",
11+
"django-redis==6.0.0",
12+
"django-db-connection-pool==1.2.6",
13+
"django-mptt==0.17.0",
14+
"psycopg[binary]==3.2.9",
15+
"python-dotenv==1.1.1",
16+
"uuid-utils==0.11.0",
17+
"captcha==0.7.1",
18+
"pytz==2025.2",
19+
"psutil==7.0.0",
20+
"cffi==1.17.1",
21+
"beautifulsoup4==4.13.4",
22+
"jieba==0.42.1",
23+
"langchain-openai==0.3.27",
24+
"langchain-anthropic==0.3.17",
25+
"langchain-community==0.3.27",
26+
"langchain-deepseek==0.1.3",
27+
"langchain-google-genai==2.1.7",
28+
"langchain-mcp-adapters==0.1.9",
29+
"langchain-huggingface==0.3.0",
30+
"langchain-ollama==0.3.4",
31+
"langgraph==0.5.3",
32+
"torch=2.8.0",
33+
"sentence-transformers==5.0.0",
34+
"qianfan==0.4.12.3",
35+
"zhipuai==2.1.5.20250708",
36+
"volcengine-python-sdk[ark]==4.0.5",
37+
"boto3==1.39.4",
38+
"tencentcloud-sdk-python==3.0.1420",
39+
"tencentcloud-sdk-python-asr==3.0.1416",
40+
"xinference-client==1.7.1.post1",
41+
"anthropic==0.57.1",
42+
"dashscope==1.23.8",
43+
"celery[sqlalchemy]==5.5.3",
44+
"django-celery-beat==2.8.1",
45+
"celery-once==3.0.1",
46+
"django-apscheduler==0.7.0",
47+
"html2text==2025.4.15",
48+
"openpyxl==3.1.5",
49+
"python-docx==1.2.0",
50+
"xlrd==2.0.2",
51+
"xlwt==1.3.0",
52+
"pymupdf==1.26.3",
53+
"pypdf==6.0.0",
54+
"pydub==0.25.1",
55+
"pysilk==0.0.1",
56+
"gunicorn==23.0.0",
57+
"python-daemon==3.1.2",
58+
"websockets==15.0.1",
59+
"pylint==3.3.7",
60+
]
1161

12-
# Web框架
13-
django = "5.2.4"
14-
drf-spectacular = { extras = ["sidecar"], version = "0.28.0" }
15-
django-redis = "6.0.0"
16-
django-db-connection-pool = "1.2.6"
17-
django-mptt = "0.17.0"
18-
psycopg = { extras = ["binary"], version = "3.2.9" }
62+
[tool.uv]
63+
package = false
1964

20-
# 工具库
21-
python-dotenv = "1.1.1"
22-
uuid-utils = "0.11.0"
23-
captcha = "0.7.1"
24-
pytz = "2025.2"
25-
psutil = "7.0.0"
26-
cffi = "1.17.1"
27-
beautifulsoup4 = "4.13.4"
28-
jieba = "0.42.1"
65+
[[tool.uv.index]]
66+
name = "pytorch"
67+
url = "https://download.pytorch.org/whl/cpu"
68+
explicit = true
2969

30-
# LLM及AI相关
31-
langchain-openai = "0.3.27"
32-
langchain-anthropic = "0.3.17"
33-
langchain-community = "0.3.27"
34-
langchain-deepseek = "0.1.3"
35-
langchain-google-genai = "2.1.7"
36-
langchain-mcp-adapters = "0.1.9"
37-
langchain-huggingface = "0.3.0"
38-
langchain-ollama = "0.3.4"
39-
langgraph = "0.5.3"
70+
[tool.uv.sources]
4071
torch = [
41-
{ version = "2.8.0+cpu", markers = "sys_platform == 'linux'", source = "pytorch" },
42-
{ version = "2.8.0+cpu", markers = "sys_platform == 'win'", source = "pytorch" },
43-
{ url = "https://download.pytorch.org/whl/cpu/torch-2.8.0-cp311-none-macosx_11_0_arm64.whl", markers = "sys_platform == 'darwin'" },
72+
{ index = "pytorch", marker = "sys_platform == 'linux'" },
73+
{ index = "pytorch", marker = "sys_platform == 'win'" },
74+
{ url = "https://download.pytorch.org/whl/cpu/torch-2.8.0-cp311-none-macosx_11_0_arm64.whl", marker = "sys_platform == 'darwin'" },
4475
]
45-
sentence-transformers = "5.0.0"
46-
47-
# 云服务SDK
48-
qianfan = "0.4.12.3"
49-
zhipuai = "2.1.5.20250708"
50-
volcengine-python-sdk = {version = "4.0.5", extras = ["ark"]}
51-
boto3 = "1.39.4"
52-
tencentcloud-sdk-python = "3.0.1420"
53-
tencentcloud-sdk-python-asr = "3.0.1416"
54-
xinference-client = "1.7.1.post1"
55-
anthropic = "0.57.1"
56-
dashscope = "1.23.8"
57-
58-
# 异步任务
59-
celery = { extras = ["sqlalchemy"], version = "5.5.3" }
60-
django-celery-beat = "2.8.1"
61-
celery-once = "3.0.1"
62-
django-apscheduler = "0.7.0"
63-
64-
# 文档处理
65-
html2text = "2025.4.15"
66-
openpyxl = "3.1.5"
67-
python-docx = "1.2.0"
68-
xlrd = "2.0.2"
69-
xlwt = "1.3.0"
70-
pymupdf = "1.26.3"
71-
pypdf = "6.0.0"
72-
73-
# 音频处理
74-
pydub = "0.25.1"
75-
pysilk = "0.0.1"
76-
77-
# 部署工具
78-
gunicorn = "23.0.0"
79-
python-daemon = "3.1.2"
80-
websockets = "15.0.1"
81-
82-
# 开发工具
83-
pylint = "3.3.7"
84-
8576

8677
[build-system]
87-
requires = ["poetry-core"]
88-
build-backend = "poetry.core.masonry.api"
89-
90-
[[tool.poetry.source]]
91-
name = "pytorch"
92-
url = "https://download.pytorch.org/whl/cpu"
93-
priority = "explicit"
78+
requires = ["hatchling"]
79+
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)