Development and Deployment using Glitch

I just stumbled upon https://glitch.com/~hello-streamlit. You can see the app here https://hello-streamlit.glitch.me/

It’s the easiest way I have yet seen to get started developing and deploying a simple Streamlit app to the public.

It’s so easy that all you have to do is sign up for an account, go to the link https://glitch.com/~hello-streamlit and click “Remix you own”. Then you will have you own docker container running and a public url like the above.

I have not tried it out. So if you do please let me know if it works.

1 Like

:wave: Author of that glitch app here!

Yeah, Glitch makes it super simple to create apps like Streamlit. I talk about this in the demo app a bit, but there are a ton of restrictions when using Glitch specifically. For example, in that example notebook, I st.cache the result of an API query (depending on which state was chosen), but since the API call can return a few MBs of data, and since Glitch has a pretty low memory limit, the app gets reset pretty often (especially when many people use the app at once). And there’s no GPU access and very little CPU that you can use.

But if you just want to show off something small and you don’t expect a ton of people to use it, it’s super easy to use and share! And you can do side-by-side code/app screens pretty easily

1 Like

To add on to asg017’s post
Yes if you want to show some prototype with all the dependencies within ~200 mb you can use glitch
The main drawbacks apart from no GPU and large dependency which I saw when using glitch and hosting my app on it

  1. It has an active time of 5 minutes after which your app would go into sleep mode
    and it would take atleast close to 5 seconds to restart it(it automatically does, you dont need to restart it)
    Solution- Write a script to hit endpoints using UptimeRobot which would ping the service once every 5 minutes to keep it awake

  2. Limited to 4000 requests per hour

  3. ~200 mb disk space and 512 mb RAM

1 Like

Regarding the ping script I have one here written in Python for awesome-streamlit.org

It should be possible to use out of the box to ping other endpoints with other frequencies.

1 Like

Hi @asg017.

How did you add the hidden files in ~/.streamlit and is it possible to update them if needed?

As far as I can see they are hidden on Glitch and I could not Google any way to show them.

Marc

In Glitch, there’s a way to open a terminal to your instance, and from there you can access hidden files and edit stuff in ~/.streamlit

Btw, I wouldn’t ping the Glitch app every 5 minutes to keep it alive. It makes it more expensive for Glitch, especially if you don’t expect much traffic going to your app (to me, it feels like abusing a free service). I think if you find yourself not wanting the app to reset itself, then it’s probably best to host your notebook on a more stable platform (heroku, render, aws, azure, etc.).

1 Like

Indeed, this is not a “feeling”; it actually does abuse the service. If everyone did this, Glitch would not exist.

Using a keep-alive approach should be considered when – AND ONLY WHEN – you need to sustain awakeness for a transient condition or functional process where you have absolutely no other remedy.

1 Like