Download Dockerfile from phamluan/test-api: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/spaces/phamluan/test-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/phamluan/test-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/phamluan/test-api/resolve/main/Dockerfile
382 Bytes
| FROM python:3.9-slim | |
| # Cài các thư viện cần thiết | |
| RUN pip install --no-cache-dir fastapi uvicorn transformers pydantic torch | |
| # Copy toàn bộ thư mục app | |
| COPY app /app | |
| # Làm việc trong thư mục app | |
| WORKDIR /app | |
| # Expose cổng đúng (quan trọng với HF Space) | |
| EXPOSE 7860 | |
| # Chạy FastAPI | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |