Linhz commited on
Commit
ce9c1ba
·
verified ·
1 Parent(s): eeffc3c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -12
Dockerfile CHANGED
@@ -1,28 +1,33 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.9
3
 
4
- # Install Java
 
 
 
5
  RUN apt-get update && \
6
  apt-get install -y openjdk-11-jdk
7
 
8
- # Set Java home environment variable
9
  ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
10
 
11
- # Install OpenGL dependencies and Xvfb
12
  RUN apt-get update && \
13
  apt-get install -y libgl1-mesa-glx libgl1-mesa-dev xvfb
14
 
15
- # Set the working directory in the container
16
- WORKDIR ViMNer/
17
-
18
- # Copy the app.py script to the working directory
19
  COPY app.py .
 
 
 
 
 
20
 
21
- # Install the required Python dependencies
22
- RUN pip install pyglet arcade pygame
23
 
24
- # Set the display environment variable
25
  ENV DISPLAY=:99
26
 
27
- # Run Xvfb and the app.py script when the container starts
28
  CMD Xvfb :99 & python app.py
 
1
+ # Sử dụng hình ảnh chính thức của Python
2
  FROM python:3.9
3
 
4
+ # Đặt thư mục làm việc trong container
5
+ WORKDIR /ViMNer
6
+
7
+ # Cài đặt Java
8
  RUN apt-get update && \
9
  apt-get install -y openjdk-11-jdk
10
 
11
+ # Đặt biến môi trường JAVA_HOME
12
  ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
13
 
14
+ # Cài đặt các phụ thuộc OpenGL Xvfb
15
  RUN apt-get update && \
16
  apt-get install -y libgl1-mesa-glx libgl1-mesa-dev xvfb
17
 
18
+ # Sao chép các tệp thư mục cần thiết vào thư mục làm việc trong container
 
 
 
19
  COPY app.py .
20
+ COPY Model/NER/VLSP2021/Predict_Ner.py Model/NER/VLSP2021/
21
+ COPY VnCoreNLP/ VnCoreNLP/
22
+ COPY models--vinai--phobert-base-v2/ models--vinai--phobert-base-v2/
23
+ COPY appthunghiem.py .
24
+ COPY requirements.txt .
25
 
26
+ # Cài đặt các phụ thuộc Python cần thiết
27
+ RUN pip install -r requirements.txt
28
 
29
+ # Đặt biến môi trường hiển thị
30
  ENV DISPLAY=:99
31
 
32
+ # Chạy Xvfb tệp app.py khi container khởi động
33
  CMD Xvfb :99 & python app.py