File size: 434 Bytes
7b9d369
 
 
9a49f5e
7b9d369
 
 
 
 
 
 
 
 
 
f350e80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Gunakan Python versi 3.9
FROM python:3.11

# Folder kerja
WORKDIR /code

# Copy file requirements.txt dan install library
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy semua file proyekmu (termasuk model dan api.py)
COPY . .

# Jalankan server FastAPI di port 7860 (Port wajib Hugging Face)
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]