LTP / Dockerfile
sashdev's picture
Update Dockerfile
3038578 verified
raw
history blame
557 Bytes
FROM python:3.9
# Install Java
RUN apt-get update && \
apt-get install -y default-jdk && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set JAVA_HOME
ENV JAVA_HOME /usr/lib/jvm/default-java
ENV PATH $PATH:$JAVA_HOME/bin
# Set up working directory
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy the application code
COPY . .
# Download SpaCy model
RUN python -m spacy download en_core_web_sm
# Set the command to run the application
CMD ["python", "app.py"]