bryan-stearns commited on
Commit
49dd4ec
1 Parent(s): 3ba89e1

Generalizing jar path to also work on local machine

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. shared_streamlit_funcs.py +1 -1
Dockerfile CHANGED
@@ -1,7 +1,7 @@
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
 
@@ -15,9 +15,9 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
 
16
  COPY . .
17
 
18
- RUN chmod 777 /code/*
19
 
20
- # Your Docker Space needs to listen on port 7860
21
  EXPOSE 7860 7860
22
  ENTRYPOINT ["streamlit", "run"]
23
  CMD ["Logic_Demo.py", "--server.port", "7860"]
 
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 that supports both Java and Python
5
  FROM openjdk:slim
6
  COPY --from=python:3.9 / /
7
 
 
15
 
16
  COPY . .
17
 
18
+ # RUN chmod 777 /code/*
19
 
20
+ # The Huggingface Docker Space needs to listen on port 7860
21
  EXPOSE 7860 7860
22
  ENTRYPOINT ["streamlit", "run"]
23
  CMD ["Logic_Demo.py", "--server.port", "7860"]
shared_streamlit_funcs.py CHANGED
@@ -2,7 +2,7 @@ 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
 
 
2
 
3
  import jnius_config
4
  if not jnius_config.vm_running:
5
+ jnius_config.set_classpath("./CognitiveReasonerLite.jar")
6
  from jnius import autoclass # For running Java. See https://pyjnius.readthedocs.io/en/latest/ for documentation.
7
 
8