Spaces:
Build error
Build error
Dockerfile
Browse files- Dockerfile +13 -12
Dockerfile
CHANGED
|
@@ -1,18 +1,19 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
# Install Gradio
|
| 7 |
-
RUN pip install gradio
|
| 8 |
|
| 9 |
-
# Copy project files
|
| 10 |
COPY . /app
|
| 11 |
-
WORKDIR /app
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
# Run Gradio app
|
| 17 |
-
CMD ["python3", "app.py"]
|
| 18 |
|
|
|
|
| 1 |
+
FROM openjdk:17-jdk-slim
|
| 2 |
|
| 3 |
+
# Set the working directory
|
| 4 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
# Copy all project files
|
| 7 |
COPY . /app
|
|
|
|
| 8 |
|
| 9 |
+
# Create a 'lib' folder and copy the JSON jar file
|
| 10 |
+
RUN mkdir -p /app/lib
|
| 11 |
+
COPY lib/json-20210307.jar /app/lib/
|
| 12 |
+
|
| 13 |
+
# Install required Python dependencies
|
| 14 |
+
RUN pip install gradio
|
| 15 |
+
|
| 16 |
+
# Run Java with classpath including the JAR file
|
| 17 |
+
CMD ["java", "-cp", "/app/lib/json-20210307.jar:/app", "Main"]
|
| 18 |
|
|
|
|
|
|
|
| 19 |
|