Skip to content
Snippets Groups Projects
Commit 599dbc0b authored by Julian Rasch's avatar Julian Rasch
Browse files

updated launcher for streamlit

parent e9b0f9cc
No related branches found
No related tags found
1 merge request!7Switch jupyterlab and app
Pipeline #232637 passed
......@@ -5,4 +5,8 @@
*.pyc
*.txt
config.txt
*.sh
\ No newline at end of file
run.sh
build.sh
run_my_app.sh
run_streamlit_app.sh
\ No newline at end of file
......@@ -7,13 +7,16 @@ RUN pip install --no-cache-dir -r requirements.txt && rm requirements.txt
ENV HOME_PATH=/home/jovyan/
# add the proxy for streamlit
COPY streamlit_proxy /tmp/streamlit_proxy/
RUN pip install /tmp/streamlit_proxy/
# install some utilities for GPT
COPY llm_utils /llm_utils/
RUN pip install /llm_utils/
ENV CONFIG_PATH=/home/jovyan/config.txt
# copy the apps into the container
COPY app /streamlit/app/
RUN chown -R jovyan /streamlit/app/
......
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M255.968 288.494L166.211 241.067L10.4062 158.753C10.2639 158.611 9.97951 158.611 9.83728 158.611C4.14838 155.909 -1.68275 161.596 0.450591 167.283L79.8393 369.685L79.8535 369.728C79.9388 369.927 80.0099 370.126 80.0953 370.325C83.3522 377.874 90.4633 382.537 98.2002 384.371C98.8544 384.513 99.3225 384.643 100.108 384.799C100.89 384.973 101.983 385.21 102.922 385.281C103.078 385.295 103.221 385.295 103.377 385.31H103.491C103.605 385.324 103.718 385.324 103.832 385.338H103.989C104.088 385.352 104.202 385.352 104.302 385.352H104.486C104.6 385.366 104.714 385.366 104.828 385.366L167.175 392.161C226.276 398.602 285.901 398.602 345.002 392.161L407.35 385.366C408.558 385.366 409.739 385.31 410.877 385.196C411.246 385.153 411.602 385.111 411.958 385.068C412 385.054 412.057 385.054 412.1 385.039C412.342 385.011 412.583 384.968 412.825 384.926C413.181 384.883 413.536 384.812 413.892 384.741C414.603 384.585 414.926 384.471 415.891 384.139C416.856 383.808 418.458 383.228 419.461 382.745C420.464 382.261 421.159 381.798 421.999 381.272C423.037 380.618 424.024 379.948 425.025 379.198C425.457 378.868 425.753 378.656 426.066 378.358L425.895 378.258L255.968 288.494Z" fill="#FF2B2B"/>
<path d="M501.789 158.755H501.647L345.784 241.07L432.426 370.058L511.616 167.285V167.001C513.607 161.03 507.492 155.627 501.789 158.755" fill="#7D353B"/>
<path d="M264.274 119.615C260.292 113.8 251.616 113.8 247.776 119.615L166.211 241.068L255.968 288.495L426.067 378.357C427.135 377.312 427.991 376.293 428.897 375.217C430.177 373.638 431.372 371.947 432.424 370.056L345.782 241.068L264.274 119.615Z" fill="#BD4043"/>
</svg>
def setup_my_app_proxy():
command = [
"streamlit",
"run",
"/streamlit/app/my_app.py",
"--server.port={port}",
"--server.headless=true",
"--browser.serverAddress=0.0.0.0",
"--browser.gatherUsageStats=false"
"/streamlit/app/run_my_app.sh",
"--browser.gatherUsageStats", "false",
"--browser.serverAddress", "0.0.0.0",
"--server.port", "{port}",
"--server.headless", "true",
"--server.enableCORS", "false",
"--server.enableXsrfProtection", "false",
]
return {
......@@ -15,6 +15,7 @@ def setup_my_app_proxy():
"new_browser_tab": False,
"launcher_entry": {
"enabled": True,
"title": "MyApp"
"title": "MyApp",
"icon_path": "/streamlit/app/streamlit-favicon.svg"
}
}
\ No newline at end of file
import os
def setup_streamlit_proxy():
command = [
"streamlit",
"run",
"/streamlit/app/app.py",
"--server.port={port}",
"--server.headless=true",
"--browser.serverAddress=0.0.0.0",
"--browser.gatherUsageStats=false"
"/streamlit/app/run_streamlit_app.sh",
"--browser.gatherUsageStats", "false",
"--browser.serverAddress", "0.0.0.0",
"--server.port", "{port}",
"--server.headless", "true",
"--server.enableCORS", "false",
"--server.enableXsrfProtection", "false",
]
return {
"command": command,
"timeout": 20,
"new_browser_tab": False,
"launcher_entry": {
"enabled": True,
"title": "Streamlit App"
"title": "Streamlit App",
"icon_path": "/streamlit/app/streamlit-favicon.svg"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment