Spaces:
Sleeping
Sleeping
Download Dockerfile from vnsd13/mini-chan-project: direct link, hf CLI and curl.
- Browser
- Download file 639 Bytes
-
https://huggingface.co/spaces/vnsd13/mini-chan-project/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/vnsd13/mini-chan-project/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/vnsd13/mini-chan-project/resolve/main/Dockerfile
639 Bytes
| # Gunakan base image Python yang stabil dan ringan | |
| FROM python:3.11-slim | |
| # Atur direktori kerja di dalam kontainer | |
| WORKDIR /code | |
| # Salin file daftar dependensi dulu dan install | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Sekarang salin SEMUA file dan folder (biar app.py ikut) | |
| COPY . /code | |
| # Tentukan port (Spaces default 7860) | |
| EXPOSE 7860 | |
| # Jalankan server FastAPI dengan uvicorn | |
| # Gunakan ${PORT:-7860} agar fleksibel di Hugging Face Spaces | |
| CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers --forwarded-allow-ips='*'"] | |