Spaces:
Sleeping
Sleeping
Download Dockerfile from VANOOOO/Talentiq-AI-api: direct link, hf CLI and curl.
- Browser
- Download file 697 Bytes
-
https://huggingface.co/spaces/VANOOOO/Talentiq-AI-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/VANOOOO/Talentiq-AI-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/VANOOOO/Talentiq-AI-api/resolve/main/Dockerfile
697 Bytes
| # Gunakan image Python ringan | |
| FROM python:3.10-slim | |
| # Set direktori kerja di dalam container | |
| WORKDIR /app | |
| # Salin file requirements terlebih dahulu | |
| COPY requirements.txt . | |
| # Install semua library yang dibutuhkan | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Buat user baru dengan ID 1000 agar sesuai aturan Hugging Face (wajib untuk security) | |
| RUN useradd -m -u 1000 user | |
| # Salin sisa file (app.py dan model) ke dalam container | |
| COPY --chown=user:user . /app | |
| # Ganti pengguna aktif menjadi 'user' | |
| USER user | |
| # Buka port 7860 (Hugging Face mewajibkan port 7860) | |
| EXPOSE 7860 | |
| # Jalankan server FastAPI menggunakan uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |