Maulidaaa commited on
Commit
682c18a
·
verified ·
1 Parent(s): fc0c11a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -12
Dockerfile CHANGED
@@ -1,24 +1,27 @@
1
- # Gunakan base image Python
2
  FROM python:3.10-slim
3
 
4
- # Install dependency sistem yang dibutuhkan (OpenCV, PIL, Ultralytics)
5
  RUN apt-get update && apt-get install -y \
6
- git \
7
- ffmpeg \
 
8
  libsm6 \
9
  libxext6 \
10
- libgl1-mesa-glx \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Buat working directory
14
  WORKDIR /app
15
 
16
- # Copy semua file ke container
17
  COPY . /app
18
 
19
- # Install dependency Python
20
- RUN pip install --no-cache-dir --upgrade pip
21
- RUN pip install --no-cache-dir -r requirements.txt
22
 
23
- # Jalankan server Flask
24
- CMD ["python", "app.py"]
 
 
 
1
+ # Gunakan Python image
2
  FROM python:3.10-slim
3
 
4
+ # Install dependencies
5
  RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ python3-dev \
8
+ libglib2.0-0 \
9
  libsm6 \
10
  libxext6 \
11
+ libxrender-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Set working directory
15
  WORKDIR /app
16
 
17
+ # Copy files
18
  COPY . /app
19
 
20
+ # Install Python dependencies
21
+ RUN pip install --upgrade pip
22
+ RUN pip install -r requirements.txt
23
 
24
+ # Jalankan Flask server
25
+ ENV FLASK_APP=app.py
26
+ ENV FLASK_RUN_HOST=0.0.0.0
27
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]