anithai commited on
Commit
6cbc0b7
·
verified ·
1 Parent(s): efb7c2a

Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -1,11 +1,15 @@
1
  FROM python:3.10-slim
2
 
3
- # Install dependencies and Java
4
  RUN apt-get update && \
5
- apt-get install -y openjdk-17-jdk unzip && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
- # Verify Java installation (important for debugging)
 
 
 
 
9
  RUN which java && java -version
10
 
11
  WORKDIR /app
 
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