Has anybody successfully deployed a Streamlit app on AWS App Runner?
I’ve tried so many different variants of the apprunner.yaml file, but it refuses to deploy
Has anybody successfully deployed a Streamlit app on AWS App Runner?
I’ve tried so many different variants of the apprunner.yaml file, but it refuses to deploy
I struggle with it right now… I tried so many things and it always fails. My latest status is using the following Dockerfile:
# syntax=docker/dockerfile:1.4
FROM public.ecr.aws/docker/library/python:3.12.2-slim
WORKDIR /app
ENV PATH="/root/.local/bin:${PATH}"
RUN pip install pipx \
&& pipx install poetry
COPY acetube_streamlit ./acetube_streamlit
COPY pyproject.toml .
COPY poetry.lock .
COPY README.md .
RUN poetry install
EXPOSE 80
ENTRYPOINT ["poetry",\
"run", \
"streamlit", \
"run", \
"acetube_streamlit/gui_app.py", \
"--server.port=80", \
"--server.address=0.0.0.0"\
]
I tried also with port 8501, but the best I got was that the URL created by App Runner could be opened and it looked like streamlit starts, but nothing happned. It looked like this:
N.B.: I played with it a little more and now I start the app using entrypoint.sh script that’s set in the ENTRYPOINT of the image. I also updated the health check to check the default /healthz provided by streamlit. Still, I get this page in the screenshot…
The only positive thing is that I’m able to open https://2u7[something].us-east-1.awsapprunner.com/healthz and I get OK. It means that the app is running. I suspect that the ports are not configured correctly in sync between the image and the App Runner.
N.B. 2: I was able to deploy it using web app provided by DigitalOcean.
Hey! I am facing the exact same issue on app runner. I understand that you went ahead with DigitalOcean, but were you able to find a solution to the endless loading issue(that image you attached)?
Yes, eventually I found a way to make it work with DigitalOcen but it was super complicated. I switched to RENDER and it was much easier
Streamlit fundamentally runs on websockets [1][2][3] which are currently not supported by the App Runner service. This is a documented service limitation [4].
References:
[1] Can’t deploy streamlit on corporate network: https://discuss.streamlit.io/t/cant-deploy-streamlit-on-corporate-network/2675
[2] Running Streamlit without using Websocket?: https://discuss.streamlit.io/t/running-streamlit-without-using-websocket/34007
[3] Websockets non-negotiable?: https://discuss.streamlit.io/t/websockets-non-negotiable/1078
[4] Support web sockets: Support web sockets · Issue #13 · aws/apprunner-roadmap · GitHub
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.