LTP / Dockerfile
sashdev's picture
Create Dockerfile
46cf5ec verified
raw
history blame
541 Bytes
# Base image with Python
FROM python:3.10-slim
# Install Java (required for language_tool_python)
RUN apt-get update && apt-get install -y openjdk-11-jdk && rm -rf /var/lib/apt/lists/*
# Set JAVA_HOME environment variable
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
ENV PATH=$JAVA_HOME/bin:$PATH
# Copy the application code to the container
COPY . /app
WORKDIR /app
# Install Python dependencies
RUN pip install -r requirements.txt
# Expose port 7860 for the Gradio app
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]