Spaces:
Sleeping
Sleeping
File size: 501 Bytes
6c8abf8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # 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"] |