sashtech's picture
Update Dockerfile
dfa5513 verified
raw
history blame contribute delete
687 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Install necessary system packages, including Java for LanguageTool
RUN apt-get update && apt-get install -y \
openjdk-11-jre-headless \
&& apt-get clean
# Set the JAVA_HOME environment variable for Java runtime
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
# Install Python dependencies
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app
# Expose port for Gradio
EXPOSE 7860
# Run the Gradio app
CMD ["python", "app.py"]