Spaces:
Running
Running
Download Dockerfile from englisheasy88/MyClass: direct link, hf CLI and curl.
- Browser
- Download file 487 Bytes
-
https://huggingface.co/spaces/englisheasy88/MyClass/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/englisheasy88/MyClass/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/englisheasy88/MyClass/resolve/main/Dockerfile
487 Bytes
| # 使用 Python 3.9 作為基礎鏡像 | |
| FROM python:3.9-slim | |
| # 設定工作目錄 | |
| WORKDIR /app | |
| # 複製依賴文件並安裝 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 複製專案原始碼 | |
| COPY . . | |
| # 暴露 Flask 預設端口 (Hugging Face Spaces 要求 7860) | |
| EXPOSE 7860 | |
| # 使用 Gunicorn 啟動應用程式 (支援 Render $PORT 與 HF Spaces 預設 7860) | |
| CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:${PORT:-7860} --timeout 300 wordApp_web:app"] | |