File size: 680 Bytes
c88b014
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Gunakan image base Python
FROM python:3.11

# Set working directory
WORKDIR /app

# Install build tools dan clean apt cache agar image tetap ringan
RUN apt-get update && apt-get install -y \

    build-essential \
    git \
    curl \
 && rm -rf /var/lib/apt/lists/*

# Copy requirements dan install
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html

# Copy seluruh kode aplikasi
COPY . .

# Expose port yang digunakan (sesuaikan dengan port API)
EXPOSE 8000

# Jalankan aplikasi
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]