Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
@@ -1,22 +1,24 @@
|
|
1 |
-
#
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
-
# Install Java (
|
5 |
RUN apt-get update && apt-get install -y openjdk-11-jdk && rm -rf /var/lib/apt/lists/*
|
6 |
|
7 |
# Set JAVA_HOME environment variable
|
8 |
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
|
9 |
ENV PATH=$JAVA_HOME/bin:$PATH
|
10 |
|
11 |
-
#
|
12 |
-
COPY . /app
|
13 |
WORKDIR /app
|
14 |
|
|
|
|
|
|
|
15 |
# Install Python dependencies
|
16 |
-
RUN pip install -r requirements.txt
|
17 |
|
18 |
-
# Expose port 7860 for
|
19 |
EXPOSE 7860
|
20 |
|
21 |
-
#
|
22 |
CMD ["python", "app.py"]
|
|
|
1 |
+
# Use a Python base image
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
+
# Install Java (needed for language-tool-python)
|
5 |
RUN apt-get update && apt-get install -y openjdk-11-jdk && rm -rf /var/lib/apt/lists/*
|
6 |
|
7 |
# Set JAVA_HOME environment variable
|
8 |
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
|
9 |
ENV PATH=$JAVA_HOME/bin:$PATH
|
10 |
|
11 |
+
# Set the working directory in the container
|
|
|
12 |
WORKDIR /app
|
13 |
|
14 |
+
# Copy the current directory contents into the container at /app
|
15 |
+
COPY . /app
|
16 |
+
|
17 |
# Install Python dependencies
|
18 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
19 |
|
20 |
+
# Expose port 7860 for Gradio
|
21 |
EXPOSE 7860
|
22 |
|
23 |
+
# Command to run the app
|
24 |
CMD ["python", "app.py"]
|