First version of streamlit on mollier
This commit is contained in:
parent
908cad3040
commit
143b73414f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
env/
|
1
.mollier/application.json
Normal file
1
.mollier/application.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"id":"d9d094de-9912-4ed4-b4f4-e055f32b2cf3","updated":"2022-08-30T17:29:21.405701","stage":"sandbox","tenant_id":"4a31a0c5-68a7-44bb-baea-aa6d122e1b95","name":"streamlit"}
|
11
.mollier/frpc.ini
Normal file
11
.mollier/frpc.ini
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[common]
|
||||||
|
server_addr = proxy.mollier.dev
|
||||||
|
server_port = 7000
|
||||||
|
|
||||||
|
[sandbox-482d651d-d7af-4bc9-b449-bcf4b820bbfd]
|
||||||
|
type = tcp
|
||||||
|
local_ip = 127.0.0.1
|
||||||
|
local_port = 8501
|
||||||
|
remote_port = 10000
|
||||||
|
use_encryption = true
|
||||||
|
use_compression = true
|
1
.mollier/sandbox.json
Normal file
1
.mollier/sandbox.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"id": "482d651d-d7af-4bc9-b449-bcf4b820bbfd", "updated": "2022-09-01T14:20:39.342440", "stage": "sandbox", "proxy_port": 10000, "connection": "inbound", "resource": "custom", "application_id": "d9d094de-9912-4ed4-b4f4-e055f32b2cf3"}
|
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
FROM python:3.10
|
||||||
|
RUN mkdir /opt/mollier
|
||||||
|
COPY . /opt/mollier
|
||||||
|
WORKDIR /opt/mollier
|
||||||
|
RUN pip install --upgrade pip
|
||||||
|
RUN pip install -e git+https://guillem:4373375038e09b91e5282e72342fb8d369cef8f6@git.guillemborrell.es/mollier/mollier.git@main#egg=mollier
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
RUN useradd -m --system --user-group mollier
|
||||||
|
RUN chown -R mollier:mollier /opt/mollier
|
||||||
|
USER mollier
|
||||||
|
CMD ph serve "streamlit run hello.py"
|
18
README.md
18
README.md
|
@ -1,3 +1,17 @@
|
||||||
# streamlit
|
# mollier/streamlit
|
||||||
|
|
||||||
Streamlit application running on mollier
|
Streamlit application running on mollier
|
||||||
|
|
||||||
|
## Install and run locally
|
||||||
|
|
||||||
|
ˋˋˋ
|
||||||
|
pip install -r requirements.txt
|
||||||
|
ph serve "streamlit run hello.py
|
||||||
|
ˋˋˋ
|
||||||
|
|
||||||
|
## Build and run a container image
|
||||||
|
|
||||||
|
ˋˋˋ
|
||||||
|
docker build . -t mollier-streamlit
|
||||||
|
docker run mollier-streamlit
|
||||||
|
ˋˋˋ
|
3
hello.py
Normal file
3
hello.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import streamlit as st
|
||||||
|
|
||||||
|
st.write("Hello from streamlit")
|
6
mollier.json
Normal file
6
mollier.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"runtime": "docker",
|
||||||
|
"layout": "container",
|
||||||
|
"port": 8501,
|
||||||
|
"entrypoint": "entrypoint.sh"
|
||||||
|
}
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
streamlit
|
||||||
|
mollier
|
Loading…
Reference in a new issue