Hi this is my python application app.py:
import streamlit as st
st.title(“My Simple Streamlit App”)
st.write(“Hello, world!”)
This is my Dockerfile:
FROM python:3.9.12
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD [“streamlit”, “run”, “app.py”, “–server.port=8501”, “–server.address=0.0.0.0”]
This is my requirements.txt:
streamlit
I create the image with:
docker build -t example .
I create the Container with:
docker run -d -p 8501:8501 --name example_container example
Container gets greated and runs but after 3-4 seconds it exits automatically.
On Linux Containers works fine.
PD: docker log:
>Welcome to Streamlit!
>If you’d like to receive helpful onboarding emails, news, offers, promotions,
>and the occasional swag, please enter your email address below. Otherwise,
>leave this field blank.
>Email:
Any idea?
Thanks!