Spaces:
Sleeping
Sleeping
chen commited on
Update Dockerfile
Browse files7 unmodified lines891011121112131516171415167 unmodified linesCOPY ./requirements.txt /code/requirements.txtRUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# [修正] 複製所有專案檔案到容器的 /code 目錄中# 這會確保 app.py 可以成功 import 其他 .py 檔案 (例如 config.py)# 複製所有專案檔案到容器的 /code 目錄中COPY . /code/
# 設定啟動指令:使用 gunicorn 啟動 app.py 中的 app 物件# 綁定到 0.0.0.0:7860,這是 HF Spaces 預期的端口CMD ["gunicorn", "--workers", "1", "--bind", "0.0.0.0:7860", "app:app"]# [修正] 設定啟動指令,並增加 --timeout 參數# 將逾時時間延長至 120 秒,以允許 AI 模型在 CPU 上有足夠的時間載入CMD ["gunicorn", "--workers", "1", "--bind", "0.0.0.0:7860", "--timeout", "120", "app:app"]Dockerfile+4-5