File size: 578 Bytes
1e91c2d
 
 
 
 
 
f742be9
 
 
1e91c2d
 
 
 
 
 
 
 
 
 
f742be9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Menggunakan base image Python 3.9
FROM python:3.9

# Mengatur direktori kerja ke /code
WORKDIR /code

# Menginstal dependencies sistem yang dibutuhkan, termasuk libGL.so.1
RUN apt-get update && apt-get install -y libgl1 && apt-get clean

# Menyalin requirements.txt ke /code
COPY ./requirements.txt /code/requirements.txt

# Menginstal dependensi dari requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Menyalin seluruh konten proyek Anda ke /code
COPY . /code

# CMD untuk menjalankan Gunicorn
CMD ["gunicorn", "main:app", "-b", "0.0.0.0:7860"]