# Gunakan base image Python FROM python:3.10-slim # Set lokasi kerja di dalam container WORKDIR /code # Copy file requirements dulu (agar build lebih cepat) COPY requirements.txt . # Install library RUN pip install --no-cache-dir --upgrade -r requirements.txt # Copy semua file kode dan model ke container COPY . . # Berikan izin akses penuh ke folder (dibutuhkan HF Spaces) RUN chmod -R 777 /code # Jalankan server di port 7860 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]