Spaces:
Sleeping
Sleeping
Download Dockerfile from aephidayatuloh/bank-model-api: direct link, hf CLI and curl.
- Browser
- Download file 534 Bytes
-
https://huggingface.co/spaces/aephidayatuloh/bank-model-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aephidayatuloh/bank-model-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aephidayatuloh/bank-model-api/resolve/main/Dockerfile
534 Bytes
| # Gunakan image Python yang memiliki kompiler dan pustaka dasar | |
| FROM python:3.12-slim | |
| # Setting environment | |
| WORKDIR /app | |
| # Menginstal dependensi | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Menyalin kode aplikasi | |
| COPY app.py . | |
| # Expose port (opsional, tetapi baik untuk dokumentasi) | |
| EXPOSE 7860 | |
| # Command untuk menjalankan aplikasi (menggunakan Gunicorn sebagai server web) | |
| CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "1", "--worker-class", "uvicorn.workers.UvicornWorker"] |