Spaces:
gallyg
/
Configuration error

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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -20,13 +20,12 @@ ENV PATH="/home/user/.local/bin:$PATH"
20
  # --- 关键修复步骤 ---
21
  # 1. 先安装项目自带的依赖
22
  RUN pip install --no-cache-dir -r requirements.txt
23
- # 2. 强制覆盖安装“黄金组合”版本,彻底解决 unhashable type: 'dict'
24
- # 这三个库的版本必须严格一致,才能兼容旧版 FastAPI 的模板系统
 
25
  RUN pip install --no-cache-dir --force-reinstall \
26
- "Jinja2==3.0.3" \
27
- "MarkupSafe==2.0.1" \
28
- "itsdangerous==2.0.1" \
29
- "starlette>=0.27.0" \
30
  "huggingface_hub"
31
 
32
  RUN mkdir -p data logs output
 
20
  # --- 关键修复步骤 ---
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