rasalit icon indicating copy to clipboard operation
rasalit copied to clipboard

How can I run all features at same time on one port using single command?

Open mishra011 opened this issue 3 years ago • 9 comments

I can see that I can run all features separately on different ports, but I want all of them to run together using one command and used one port.

mishra011 avatar May 14 '21 09:05 mishra011

You'd need to run something like nginx in front of it as a proxy. This is possible, but not super obvious to get right.

koaning avatar May 14 '21 11:05 koaning

@koaning Yes, we can do it, we can run all of them separately on different ports then use a reverse proxy to combine them on one port. But I was wishing since most people will be using all of them, so instead of running all 4 separately, shouldn't we have a feature to run all of them at once then use them accordingly.

mishra011 avatar May 15 '21 07:05 mishra011

You're the first person suggesting to use all views at the same time actually. I'm open to a tutorial for the readme but I doubt streamlit open aohrce allows you to spin up multiple apps on a single port.

koaning avatar May 15 '21 07:05 koaning

I think all views at the same place can be a nice feature if streamlit supports it.

mishra011 avatar May 15 '21 15:05 mishra011

I agree this would be a very useful feature to make the tool more user-friendly and easier to deploy for general use rather than individual developers or data scientists playing around with it.

In the meantime it would be helpful to have a Dockerfile with an image for each tool, that way you could easily spin all of the tools at the same time along with an nginx reverse proxy using Docker Compose, without needing to change any Python code.

drewsilcock avatar Jul 20 '21 12:07 drewsilcock

I'll gladly review any PR for a Dockerfile that does this.

koaning avatar Jul 20 '21 12:07 koaning

This might also make it easy to ship the bulk labelling tool now that I think of it. Althought probably best to keep as a separate Dockerfile.

koaning avatar Jul 20 '21 12:07 koaning

It would also be possible to implement a sidebar navigation like this other repo - awesome-streamlit.

See: https://github.com/MarcSkovMadsen/awesome-streamlit/blob/be454e29c35a9a1a760b1737a5176a47f4f9717b/app.py#L5-L30

drewsilcock avatar Jul 26 '21 17:07 drewsilcock

Pushed a PR containing a Dockerfile, docker-compose.yaml and Nginx configuration for this reverse proxying solution: #60.

drewsilcock avatar Jul 26 '21 17:07 drewsilcock