Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SNOW-103] Create a streamlit app template #68

Merged
merged 32 commits into from
Aug 13, 2024

Conversation

jaymedina
Copy link
Contributor

@jaymedina jaymedina commented Jul 19, 2024

problem

There is currently no template or guide for generating a Streamlit application the communicates with Snowflake, and launching it via an EC2 instance provisioned through Sage's Service Catalog.

solution

A new template is introduced with built-in scripts and functions that serve to make the development process easier when creating a Streamlit app, and minimizes overhead when deploying within an EC2 instance.

The structure of the template is as follows:

streamlit_template/
├── .streamlit/
│   ├── config.toml
│   └── example_secrets.toml
├── tests/
│   ├── __init__.py
│   └── test_app.py
├── toolkit/
│   ├── __init__.py
│   ├── queries.py
│   ├── utils.py
|   └── widgets.py
├── Dockerfile
├── app.py
├── requirements.txt
└── style.css

example app using template

image

.gitignore Outdated Show resolved Hide resolved
Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work here! adding my inItial comments.

streamlit_template/toolkit/queries.py Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@jaymedina jaymedina marked this pull request as ready for review August 3, 2024 02:12
@jaymedina jaymedina requested a review from a team as a code owner August 3, 2024 02:13
Copy link
Contributor

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really awesome to see!

@jaymedina

To gauge interest and to get your thought. Do you have interest in getting some kubernetes experience later on by Porting this over to run in the k8s cluster?

https://docs.docker.com/guides/deployment-orchestration/kube-deploy/

My goal is to make deployment easy so we can throw apps like this out there and expose it out to Sage staff on the vpn

@jaymedina
Copy link
Contributor Author

To gauge interest and to get your thought. Do you have interest in getting some kubernetes experience later on by Porting this over to run in the k8s cluster?

Absolutely, that sounds like a great idea! This type of app isn't very resource heavy and it'd be a good way to start developing some guidelines for deployment on k8s.

Copy link

sonarcloud bot commented Aug 13, 2024

@jaymedina jaymedina merged commit 1e72767 into dev Aug 13, 2024
3 checks passed
@jaymedina jaymedina deleted the SNOW-103-streamlit-template branch August 13, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants