mirror of
https://github.com/jingyaogong/minimind.git
synced 2026-09-28 05:47:23 +00:00
[fix] requirements.txt 缺 fastapi/uvicorn,按 README 跑 serve_openai_api.py 直接崩
README 的「第0步」让用户 pip install -r requirements.txt 完成环境搭建,
随后在 OpenAI 兼容服务一节给出可直接运行的命令(README.md:1652):
cd scripts && python serve_openai_api.py
但 scripts/serve_openai_api.py 第12行 import uvicorn、第16-17行
from fastapi import ... 都是顶层硬依赖,而 requirements.txt 里两个都没有。
复现(venv 严格按 requirements.txt 装齐):
$ cd scripts && python serve_openai_api.py --help
ModuleNotFoundError: No module named 'uvicorn'
补上两行。版本已在独立 venv 里验证可与已声明的 pydantic==2.11.5 共存。
This commit is contained in:
@@ -28,6 +28,8 @@ streamlit==1.50.0
|
|||||||
einops==0.8.1
|
einops==0.8.1
|
||||||
swanlab==0.9.8
|
swanlab==0.9.8
|
||||||
modelscope==1.37.0
|
modelscope==1.37.0
|
||||||
|
fastapi==0.120.1
|
||||||
|
uvicorn==0.38.0
|
||||||
# torch==2.6.0
|
# torch==2.6.0
|
||||||
# torchvision==0.21.0
|
# torchvision==0.21.0
|
||||||
# peft==0.7.1
|
# peft==0.7.1
|
||||||
|
|||||||
Reference in New Issue
Block a user