ViMNer / Dockerfile
Linhz's picture
Update Dockerfile
a52ee55 verified
raw
history blame
908 Bytes
# Sử dụng một base image có sẵn
FROM python:3.8
# Cài đặt OpenJDK (Java Development Kit)
RUN apt-get update && \
apt-get install -y default-jdk
# Tạo thư mục /app trong container
WORKDIR /app/
# Sao chép tất cả các file cần thiết từ thư mục nguồn vào thư mục /app trong container
COPY app.py /app/
COPY Model/NER/VLSP2021/Predict_Ner.py /app/Model/NER/VLSP2021/
COPY VnCoreNLP/ /app/VnCoreNLP/
# Sao chép file requirements.txt từ thư mục nguồn vào thư mục /app trong container
COPY requirements.txt /app/
# Cài đặt các thư viện Python từ requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Thiết lập biến môi trường
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
ENV VN_CORE_NLP_HOME /app/VnCoreNLP
# Câu lệnh chạy ứng dụng khi container được khởi động
CMD ["streamlit", "run", "app.py"]