Spaces:
Sleeping
Sleeping
Download Dockerfile from GphaHoa/chinese_learning_v2: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/spaces/GphaHoa/chinese_learning_v2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/GphaHoa/chinese_learning_v2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/GphaHoa/chinese_learning_v2/resolve/main/Dockerfile
481 Bytes
| FROM python:3.11-slim | |
| WORKDIR /code | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # 6. Hugging Face Spaces chạy mặc định ở port 7860 | |
| # Gunicorn sẽ lắng nghe ở port này | |
| ENV PORT=7860 | |
| # 7. Lệnh để chạy ứng dụng | |
| # Cấu trúc: gunicorn -b 0.0.0.0:7860 tên_file_chạy:biến_flask | |
| # Nếu file của bạn là run.py và biến Flask là app thì dùng "run:app" | |
| CMD ["gunicorn", "-b", "0.0.0.0:7860", "run:app"] |