I am trying to run my Streamlit application on my Amazon EC2 instance from within my VS Code dev container (https://code.visualstudio.com/docs/remote/containers). However it is always stuck on “Please wait…”.
I have done the following:
- Forwarded port 8501 via VS Code’s port forwarding capability
- Added my custom TCP rule for 8501 on my EC2
- Exposed 8501 in my local Dockerfile
- Set enableCORS=false
The application works fine locally if I run it outside of the container but gets stuck at ‘Please wait…’ when I try to run my app via my dev container. I am able to run other applications (eg JupyterLab) via my container so it seems to be a problem with how I’m configuring Streamlit specifically. I also have successfully run the awesome-streamlit Docker image here (https://hub.docker.com/r/marcskovmadsen/awesome-streamlit) on port 80 on my EC2 (however I did this via sshing onto my instance, not through the dev container). Does anyone have any experience working with Streamlit on the VS Code dev container?
.streamlit/config.tml is as follows:
Furthermore, when I run
docker run -it --rm <image_name> on my EC2 outside of the dev container, the same issue occurs.