nanye commited on
Commit
93c34ad
·
1 Parent(s): 2bbc9ab

different frontends

Browse files
Dockerfile CHANGED
@@ -2,12 +2,11 @@ FROM python:3.12
2
 
3
  WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY . .
10
-
11
  EXPOSE 7860
12
 
13
- CMD ["shiny", "run", "decision.py", "--host", "0.0.0.0", "--port", "7860"]
 
 
2
 
3
  WORKDIR /code
4
 
5
+ COPY ./frontends/gradio/ /code
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
 
 
9
  EXPOSE 7860
10
 
11
+ #CMD ["shiny", "run", "decision.py", "--host", "0.0.0.0", "--port", "7860"]
12
+ CMD ["python", "gradio_eg.py"]
frontends/gradio/Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./frontends/gradio/requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ COPY . .
10
+
11
+ EXPOSE 7860
12
+
13
+ #CMD ["shiny", "run", "decision.py", "--host", "0.0.0.0", "--port", "7860"]
14
+ CMD ["python", "gradio_eg.py", "--host", "0.0.0.0", "--port", "7860"]
frontends/gradio/gradio_eg.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks() as demo:
4
+ gr.Markdown("# My Gradio App")
5
+
6
+ #demo.launch()
7
+ demo.launch(server_name="0.0.0.0", server_port=7860)
8
+ #demo.launch(server_name="0.0.0.0", server_port=8765)
9
+
10
+
frontends/gradio/requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio
frontends/shiny/Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ COPY . .
10
+
11
+ EXPOSE 7860
12
+
13
+ #CMD ["shiny", "run", "decision.py", "--host", "0.0.0.0", "--port", "7860"]
14
+ CMD ["python", "gradio_eg.py", "--host", "0.0.0.0", "--port", "7860"]
frontends/shiny/requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ faicons
2
+ shiny
3
+ shinywidgets
4
+ plotly
5
+ pandas
6
+ ridgeplot
gradio_eg.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks() as demo:
4
+ gr.Markdown("# My Gradio App")
5
+
6
+ #demo.launch()
7
+ demo.launch(server_name="0.0.0.0", server_port=7860)
8
+ #demo.launch(server_name="0.0.0.0", server_port=8765)
9
+
10
+