Spaces:
Running
Running
File size: 475 Bytes
6881911 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Gunakan Python 3.9 yang stabil
FROM python:3.9
# Set working directory
WORKDIR /code
# Copy requirements dan install
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy semua file ke dalam image
COPY . .
# Beri hak akses (opsional tapi good practice di HF)
RUN chmod -R 777 /code
# Jalankan server di port 7860 (Port wajib HF Spaces)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |