bryan-stearns
commited on
Commit
•
91d29dc
1
Parent(s):
437883c
Setting Dockerfile for app
Browse files- Dockerfile +8 -2
- requirements.txt +3 -0
- shared_streamlit_funcs.py +1 -2
Dockerfile
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
|
6 |
WORKDIR /code
|
7 |
|
@@ -12,4 +16,6 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
12 |
COPY . .
|
13 |
|
14 |
# Your Docker Space needs to listen on port 7860
|
15 |
-
|
|
|
|
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
+
### 1. Get Linux
|
5 |
+
FROM openjdk:slim
|
6 |
+
COPY --from=python:3.9 / /
|
7 |
+
|
8 |
+
####
|
9 |
|
10 |
WORKDIR /code
|
11 |
|
|
|
16 |
COPY . .
|
17 |
|
18 |
# Your Docker Space needs to listen on port 7860
|
19 |
+
EXPOSE 7860 7860
|
20 |
+
ENTRYPOINT ["streamlit", "run"]
|
21 |
+
CMD ["Logic_Demo.py", "--server.port", "7860"]
|
requirements.txt
CHANGED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
streamlit
|
2 |
+
pyjnius
|
3 |
+
pandas
|
shared_streamlit_funcs.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
from distutils.command.config import config
|
2 |
import streamlit as st
|
3 |
|
4 |
import jnius_config
|
5 |
if not jnius_config.vm_running:
|
6 |
-
jnius_config.set_classpath("/
|
7 |
from jnius import autoclass # For running Java. See https://pyjnius.readthedocs.io/en/latest/ for documentation.
|
8 |
|
9 |
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
import jnius_config
|
4 |
if not jnius_config.vm_running:
|
5 |
+
jnius_config.set_classpath("/code/CognitiveReasonerLite.jar")
|
6 |
from jnius import autoclass # For running Java. See https://pyjnius.readthedocs.io/en/latest/ for documentation.
|
7 |
|
8 |
|