From 08e330c684887eab3443706ef0070ce1f28d5450 Mon Sep 17 00:00:00 2001 From: smilebasti <60941345+smilebasti@users.noreply.github.com> Date: Sun, 27 Aug 2023 09:17:46 +0200 Subject: [PATCH 1/6] Create Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..47aed70 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.10-slim + +WORKDIR /app + +RUN apt-get update && apt-get install -y \ + curl \ + && rm -rf /var/lib/apt/lists/* + +COPY streamlit-prettymapp /app/ + +RUN pip3 install -r requirements.txt + +EXPOSE 8501 + +HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health + +ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] From b970a354762a72bd7f5dd8182d037ed7c00c3781 Mon Sep 17 00:00:00 2001 From: smilebasti <60941345+smilebasti@users.noreply.github.com> Date: Sun, 27 Aug 2023 09:18:24 +0200 Subject: [PATCH 2/6] remove local requirement of prettymap --- streamlit-prettymapp/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit-prettymapp/requirements.txt b/streamlit-prettymapp/requirements.txt index c50a7cf..1d98603 100644 --- a/streamlit-prettymapp/requirements.txt +++ b/streamlit-prettymapp/requirements.txt @@ -1,3 +1,3 @@ streamlit==1.26.0 streamlit-image-select==0.6.0 --e ../prettymapp \ No newline at end of file +prettymapp From 48991192b83e5dc309b2b868faabff2bd11805eb Mon Sep 17 00:00:00 2001 From: smilebasti <60941345+smilebasti@users.noreply.github.com> Date: Sun, 27 Aug 2023 09:21:51 +0200 Subject: [PATCH 3/6] fix directorys in app.py for examples --- streamlit-prettymapp/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamlit-prettymapp/app.py b/streamlit-prettymapp/app.py index aa8bf13..6c11b5f 100644 --- a/streamlit-prettymapp/app.py +++ b/streamlit-prettymapp/app.py @@ -18,7 +18,7 @@ ) st.markdown("# Prettymapp") -with open("./streamlit-prettymapp/examples.json", "r") as f: +with open("./examples.json", "r") as f: EXAMPLES = json.load(f) if not st.session_state: @@ -30,7 +30,7 @@ st.session_state["previous_style"] = "Peach" st.session_state["previous_example_index"] = 0 -example_image_pattern = "streamlit-prettymapp/example_prints/{}_small.png" +example_image_pattern = "example_prints/{}_small.png" example_image_fp = [ example_image_pattern.format(name.lower()) for name in list(EXAMPLES.keys())[:4] ] From 91945e8d7f264a6f8fbfabfe01ca1a7be7e69eda Mon Sep 17 00:00:00 2001 From: smilebasti <60941345+smilebasti@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:36:05 +0200 Subject: [PATCH 4/6] Update Dockerfile --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 47aed70..3c21b93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,17 @@ -FROM python:3.10-slim - -WORKDIR /app +FROM python:3.11-slim RUN apt-get update && apt-get install -y \ curl \ && rm -rf /var/lib/apt/lists/* -COPY streamlit-prettymapp /app/ +COPY streamlit-prettymapp /app/streamlit-prettymapp/ + +WORKDIR /app -RUN pip3 install -r requirements.txt +RUN pip3 install -r streamlit-prettymapp/requirements.txt EXPOSE 8501 HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] +ENTRYPOINT ["streamlit", "run", "streamlit-prettymapp/app.py", "--server.port=8501", "--server.address=0.0.0.0"] From bf43344483900ef4de286298a5326df0b41be7d3 Mon Sep 17 00:00:00 2001 From: smilebasti <60941345+smilebasti@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:38:38 +0200 Subject: [PATCH 5/6] Update app.py --- streamlit-prettymapp/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamlit-prettymapp/app.py b/streamlit-prettymapp/app.py index 14c5699..c30a906 100644 --- a/streamlit-prettymapp/app.py +++ b/streamlit-prettymapp/app.py @@ -18,7 +18,7 @@ ) st.markdown("# Prettymapp") -with open("./examples.json", "r") as f: +with open("./streamlit-prettymapp/examples.json", "r") as f: EXAMPLES = json.load(f) if not st.session_state: @@ -30,7 +30,7 @@ st.session_state["previous_style"] = "Peach" st.session_state["previous_example_index"] = 0 -example_image_pattern = "example_prints/{}_small.png" +example_image_pattern = "streamlit-prettymapp/example_prints/{}_small.png" example_image_fp = [ example_image_pattern.format(name.lower()) for name in list(EXAMPLES.keys())[:4] ] From b5fc7c7271e5a90090ae13d3750ae6c86a8523bc Mon Sep 17 00:00:00 2001 From: smilebasti <60941345+smilebasti@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:40:24 +0200 Subject: [PATCH 6/6] Update app.py