phurwicz / hover

:speedboat: Label data at scale. Fun and precision included.
https://phurwicz.github.io/hover
MIT License
323 stars 19 forks source link

QuickStart via Docker Container #29

Closed GeorgePearse closed 1 year ago

GeorgePearse commented 2 years ago

Feel like this could be made to be very easy to demo/test, if it were possible to run some of the core components (UI) as a docker image, and then the data was loaded via an API.

phurwicz commented 2 years ago

Binder basically does this. Have you checked out the quickstart page? It prepares an environment for you to run example code, plus any custom code for demos and tests.

With docker image itself it’s not clear to me how to easily add custom code in different places for data handling. It’s certainly possible to add the docker option, but I want to first figure out the best way to support your use case.

GeorgePearse commented 2 years ago

I was having trouble with the Binder set-up (may be a problem with my browser now that I think about), but did quickly realise that it would be very hard to do this well in a docker container. Thanks for your help and quick response.

phurwicz commented 2 years ago

Just to clarify, does the in-browser code work for you now? To be specific

GeorgePearse commented 2 years ago

image

On the very quick start route I'm having no luck. I don't have any browser extensions.

image

haochuanwei commented 2 years ago

I don't have any browser extensions.

You are not expected to need one. Also for most purposes you don't need to go directly to Binder -- doc pages are supposed to use Binder under the hood and let you deal with code just like in a Jupyter notebook.

Let me know if you can reproduce the below behavior.

Example from my browser: (this also works on my cell phone in Safari)

Binder initializing itself; note the status change

Screen Shot 2022-06-15 at 4 04 27 AM Screen Shot 2022-06-15 at 4 04 39 AM Screen Shot 2022-06-15 at 4 04 46 AM

Running code in the browser

Screen Shot 2022-06-15 at 4 04 58 AM
haochuanwei commented 2 years ago

@GeorgePearse Hi George, I'm trying to figure out if the example above helps. Are you trying to make a customized demo? Or are you just looking for a generic (pre-coded) demo that can be run without installation?

FarisHijazi commented 2 years ago

Hello, I also agree with the need to have a generic pre-coded demo where people can start with as a hello-world and move on from there, especially one that runs the server

haochuanwei commented 2 years ago

Hi Faris,

There are pre-coded demos in phurwicz/hover-binder (https://github.com/phurwicz/hover-binder). Basically you click on the link of a demo, wait for loading, and get to an annotation interface immediately. Does that meet this need?

Best regards, Haochuan


From: Faris Hijazi @.> Sent: Thursday, July 21, 2022 8:29 PM To: phurwicz/hover @.> Cc: Harry Wei @.>; Comment @.> Subject: Re: [phurwicz/hover] QuickStart via Docker Container (Issue #29)

Hello, I also agree with the need to have a generic pre-coded demo where people can start with as a hello-world and move on from there, especially one that runs the server

— Reply to this email directly, view it on GitHubhttps://github.com/phurwicz/hover/issues/29#issuecomment-1191424149, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEZTDWQOIJ4F3I4UT77WZD3VVE7BFANCNFSM5YYSUFHA. You are receiving this because you commented.Message ID: @.***>

haochuanwei commented 2 years ago

Hello, I also agree with the need to have a generic pre-coded demo where people can start with as a hello-world and move on from there, especially one that runs the server

We moved the section containing demos closer to the top: https://github.com/phurwicz/hover#rocket-live-demos

I can imagine that the "Features" section took too much space for the "Quickstart" (now "Live Demo") section to be spotted.

We'd really appreciate any feedback you have on this change :)

FarisHijazi commented 2 years ago

I do have some feedback actually,

It would be great if these pages with jupyter-like cells actually had a downloadable jupyter notebook file (.ipynb)

I do need to mention that I'm not a fan of binder and it has a bit of a learning curve, ideally this app should be deployable locally through a webserver, is that possible with binder?

I forgot to mention, but I'm thankful for the useful tool, it's just that it's hard to get started with

haochuanwei commented 2 years ago

About downloading notebooks: great point, we will add it. For now there will be just the code blocks, but we plan to include the walkthrough properly.

About hosting on a server: yes, you can deploy on any computer equipped with a Python environment (https://phurwicz.github.io/hover/pages/tutorial/t2-bokeh-app/). Binder is just for hosting demos that don’t require you to install anything, but when you use hover on your own, you can skip Binder.


From: Faris Hijazi @.> Sent: Thursday, July 21, 2022 10:13:13 PM To: phurwicz/hover @.> Cc: Harry Wei @.>; Comment @.> Subject: Re: [phurwicz/hover] QuickStart via Docker Container (Issue #29)

I do have some feedback actually,

It would be great if these pageshttps://phurwicz.github.io/hover/pages/tutorial/t0-quickstart/ with jupyter-like cells actually had a downloadable jupyter notebook file (.ipynb)

I do need to mention that I'm not a fan of binder and it has a bit of a learning curve, ideally this app should be deployable locally through a webserver, is that possible with binder?

I forgot to mention, but I'm thankful for the useful tool, it's just that it's hard to get started with

— Reply to this email directly, view it on GitHubhttps://github.com/phurwicz/hover/issues/29#issuecomment-1191537629, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEZTDWRVDHV4VJ2PRAGB62DVVFLHTANCNFSM5YYSUFHA. You are receiving this because you commented.Message ID: @.***>

phurwicz commented 2 years ago

@FarisHijazi notebook download is now available. The notebook has code blocks (adapted for local usage, slightly different from the doc page) and walkthrough markdown.

For example, the quickstart notebook is auto-generated from the source code behind the quickstart doc page.

On each notebook-like doc page, we added a line pointing to the folder of notebooks. See the bottom of screenshot below: Screen Shot 2022-07-23 at 7 48 12 PM


ideally this app should be deployable locally through a webserver

When you download the notebook and run, you are hosting locally. For more options (hosting explicitly on HTTP, for example), see here. Let us know if we can assist further on this part. Thanks!

FarisHijazi commented 2 years ago

that's awesome! will check it out and let you know if I face any difficulties. Let's aim to make this app super easy to start with, because it has a LOT of useful features and it would be a shame to see people leave because they're too lazy to get it to start

robinsonkwame commented 2 years ago

ftw, I also found it difficult to load hover on my own because I do not know Bokeh. However, I was able to start the server by replacing the Server related code, including the binder_proxy_app call and imports, with the following:

server = Server(
    {'/my-app': interactive_plot},
    port=5007,
    allow_websocket_origin=['*'],
    use_xheaders=True
)

server.start()
server.io_loop.add_callback(server.show, "/my-app")
server.io_loop.start() 

All that aside, wonderful work!

haochuanwei commented 2 years ago

Hi Kwame, thanks first of all!

Were you running hover locally? If so, you are right to disregard the binder stuff. Those are only needed when you run code directly in the browser using a binder kernel instead of a local one. Could you help provide a little more info if any of the below cases apply?

Both of the above would be unintended, and we are happy to correct it at once.


From: Kwame Porter Robinson @.> Sent: Friday, August 19, 2022 5:43 AM To: phurwicz/hover @.> Cc: Harry Wei @.>; Comment @.> Subject: Re: [phurwicz/hover] QuickStart via Docker Container (Issue #29)

ftw, I also found it difficult to load hover on my own because I do not know Bokeh. However, I was able to start the server by replacing the Server related code, including the binder_proxy_app call and imports, with the following:

server = Server( {'/my-app': interactive_plot}, port=5007, allow_websocket_origin=['*'], use_xheaders=True )

server.start() server.io_loop.add_callback(server.show, "/my-app") server.io_loop.start()

All that aside, wonderful work!

— Reply to this email directly, view it on GitHubhttps://github.com/phurwicz/hover/issues/29#issuecomment-1219995804, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEZTDWTGBZCCYM4HAIYC5DTVZ2U7LANCNFSM5YYSUFHA. You are receiving this because you commented.Message ID: @.***>

robinsonkwame commented 2 years ago

Nope, I was running on the command line in a project that leverages this one.

haochuanwei commented 2 years ago

I see, yes for command line you do need bokeh server :)

Best regards, Haochuan


From: Kwame Porter Robinson @.> Sent: Friday, August 19, 2022 7:57:15 PM To: phurwicz/hover @.> Cc: Harry Wei @.>; Comment @.> Subject: Re: [phurwicz/hover] QuickStart via Docker Container (Issue #29)

Nope, I was running on the command line in a project that leverages this one. https://github.com/robinsonkwame/qca-analysis-pipeline/blob/main/app/app.py

— Reply to this email directly, view it on GitHubhttps://github.com/phurwicz/hover/issues/29#issuecomment-1220589029, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEZTDWT3S7TUXUNACXAZG7LVZ5ZBXANCNFSM5YYSUFHA. You are receiving this because you commented.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.