Rzx008 commited on
Commit
2907f3f
·
verified ·
1 Parent(s): 87796b4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -17
Dockerfile CHANGED
@@ -1,31 +1,24 @@
1
- FROM python:3.8-slim
2
 
3
- # Update dan install dependensi termasuk Tesseract
4
  RUN apt-get update && \
5
- apt-get install -y \
6
- ffmpeg \
7
- imagemagick \
8
- webp \
9
- tesseract-ocr && \ # Menambahkan instalasi Tesseract
10
- apt-get clean && \
11
- rm -rf /var/lib/apt/lists/*
12
 
13
  WORKDIR /app
14
 
15
- # Salin requirements.txt
16
  COPY requirements.txt .
17
 
18
- # Install dependencies Python
19
- RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Salin seluruh kode aplikasi
22
  COPY . .
23
 
24
- # Mengekspos port
25
  EXPOSE 7860
26
 
27
- # Mengubah izin akses ke aplikasi
28
  RUN chmod -R 777 /app
29
 
30
- # Jalankan aplikasi
31
- CMD ["python3", "app.py"]
 
1
+ FROM python
2
 
 
3
  RUN apt-get update && \
4
+ apt-get install -y \
5
+ ffmpeg \
6
+ tesseract-ocr \
7
+ imagemagick \
8
+ webp && \
9
+ apt-get upgrade -y && \
10
+ rm -rf /var/lib/apt/lists/*
11
 
12
  WORKDIR /app
13
 
 
14
  COPY requirements.txt .
15
 
16
+ RUN pip install -r requirements.txt
 
17
 
 
18
  COPY . .
19
 
 
20
  EXPOSE 7860
21
 
 
22
  RUN chmod -R 777 /app
23
 
24
+ CMD ["python3", "app.py"]