anithai commited on
Commit
c299a01
·
verified ·
1 Parent(s): 5438f43

Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -18
Dockerfile CHANGED
@@ -1,27 +1,19 @@
1
  FROM python:3.10-slim
2
 
3
- # Install Java 17 (correct path setup for Hugging Face Spaces)
4
- RUN apt-get update && \
5
- apt-get install -y openjdk-17-jdk && \
6
- rm -rf /var/lib/apt/lists/*
7
-
8
- # Set Java path explicitly
9
- ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
10
- ENV PATH=$JAVA_HOME/bin:$PATH
11
-
12
- # Verify Java installation
13
- RUN which java && java -version
14
 
 
15
  WORKDIR /app
16
 
17
- # Copy project files
18
- COPY . .
19
 
20
- # Extract lib.zip to the correct path
21
- RUN unzip lib.zip -d lib
22
 
23
- # Install Python dependencies
24
- RUN pip install -r requirements.txt
25
 
26
- # Command to run the app
27
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install Java
4
+ RUN apt-get update && apt-get install -y default-jdk
 
 
 
 
 
 
 
 
 
5
 
6
+ # Create working directory
7
  WORKDIR /app
8
 
9
+ # Copy all project files
10
+ COPY . /app
11
 
12
+ # Add JAR file path to CLASSPATH
13
+ ENV CLASSPATH="/app/lib/json-20210307.jar:/app"
14
 
15
+ # Install Gradio
16
+ RUN pip install gradio
17
 
18
+ # Run the Gradio interface
19
  CMD ["python", "app.py"]