Skip to content

Template to run Streamlit apps on GitHub Codespaces

Notifications You must be signed in to change notification settings

eevensen/st-codespaces

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Run Streamlit on Codespaces

Fork this repo, add your Streamlit app to it, and run it on GitHub Codespaces. 🎈

How it works

  • .devcontainer/devcontainer.json creates a container with Python 3.7 and the latest version of Streamlit.

  • It uses forwardPorts to make port 8501 inside the container available locally.

  • Additionally, it sets the following configuration options in .streamlit/config.toml so that the app can be run on Codespaces without the addition of command line arguments:

    [server]
    enableCORS = false
    enableXsrfProtection = false

Example usage

Fork this repo, open it on GitHub Codespaces, and run the following command to view the Hello app:

streamlit hello

st-codespaces

If it weren't for the .streamlit/config.toml file, you would have had to run the following command:

streamlit hello --server.enableCORS false --server.enableXsrfProtection false

About

Template to run Streamlit apps on GitHub Codespaces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%