sashtech commited on
Commit
1cac35d
·
verified ·
1 Parent(s): 17c90b4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install necessary system packages, including Java for LanguageTool
8
+ RUN apt-get update && apt-get install -y \
9
+ openjdk-11-jre-headless \
10
+ && apt-get clean
11
+
12
+ # Set the JAVA_HOME environment variable for Java runtime
13
+ ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
14
+
15
+ # Install Python dependencies
16
+ COPY requirements.txt requirements.txt
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy the current directory contents into the container at /app
20
+ COPY . /app
21
+
22
+ # Expose port for Gradio
23
+ EXPOSE 7860
24
+
25
+ # Run the Gradio app
26
+ CMD ["python", "your_app_script.py"]