Spaces:
gallyg
/
Configuration error

gallyg commited on
Commit
2a7c408
·
verified ·
1 Parent(s): 1d29d16

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -21,11 +21,11 @@ ENV PATH="/home/user/.local/bin:$PATH"
21
  # 1. 先安装项目自带的依赖
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
- # 2. 强制降级 FastAPI Starlette 到兼容版本
25
- # 彻底解决 TemplateResponse 传参顺序导致的 unhashable type: 'dict'
26
  RUN pip install --no-cache-dir --force-reinstall \
27
- "fastapi==0.99.1" \
28
  "starlette==0.27.0" \
 
29
  "huggingface_hub"
30
 
31
  RUN mkdir -p data logs output
@@ -33,4 +33,4 @@ RUN mkdir -p data logs output
33
  EXPOSE 7860
34
 
35
  # 启动同步脚本
36
- CMD ["python", "/app/sync_run.py"]
 
21
  # 1. 先安装项目自带的依赖
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+ # 2. 强制安装黄金组合:既保留新版 Pydantic V2,又锁死兼容的 Starlette 0.27.0
 
25
  RUN pip install --no-cache-dir --force-reinstall \
26
+ "fastapi==0.104.1" \
27
  "starlette==0.27.0" \
28
+ "pydantic>=2.4.0" \
29
  "huggingface_hub"
30
 
31
  RUN mkdir -p data logs output
 
33
  EXPOSE 7860
34
 
35
  # 启动同步脚本
36
+ CMD["python", "/app/sync_run.py"]