Run a Streamlit application from a GitHub repository
1.1K
This repository contains a Docker container to run Streamlit applications from a GitHub repository or from a local volume.
Before getting started, make sure you have the following installed on your machine:
Download the image
docker pull rylorin/streamlit-docker
Run the container
docker run -p 8501:8501 rylorin/streamlit-docker
Access the application
The GIT_URL variable specifies the Git repository URL containing the Streamlit application to be executed. By default, it is set to https://github.com/streamlit/streamlit-example.git.
You can change it by specifying another URL:
export GIT_URL="https://github.com/your-user/your-repository.git"
docker run -p 8501:8501 --env GIT_URL="${GIT_URL}" rylorin/streamlit-docker
Or you can and mount your own script or volume to run a local application:
docker run -p 8501:8501 -v $(pwd)/my_app:/app/streamlit_app/ rylorin/streamlit-docker
docker logs -f <container_id>
docker exec -it <container_id> /bin/sh
GIT_URLThe GIT_URL variable specifies the Git repository URL containing the Streamlit application to be executed and can be set directly in docker-compose.yml:
environment:
GIT_URL: https://github.com/your-user/your-repository.git
Example docker-compose.yml configuration to deploy the application with Docker Compose:
version: "3.8"
services:
streamlit:
image: rylorin/streamlit-docker:latest
ports:
- 8501:8501/tcp
environment:
GIT_URL: ${GIT_URL:-https://github.com/streamlit/streamlit-example.git}
networks:
- default
- system_dmz_network
networks:
default:
system_dmz_network:
external: true
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please submit a pull request to rylorin/streamlit-docker GitHub repository with your improvements.
Content type
Image
Digest
sha256:d2efd48f3…
Size
434.2 MB
Last updated
over 1 year ago
docker pull rylorin/streamlit-docker