badlands-model / badlands

Basin and Landscape Dynamics model

Home Page:https://badlands.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems Installing in Docker and Running in Binder

Gurdiac opened this issue · comments

Hi guys,

PyBadlands looks amazing! I want to use it for teaching, both as a demonstration from my laptop and as an exercise for students to run from the cloud. I am not a coder, although I am graduallly getting up to speed using Jupyter notebooks, so I have enough knowledge to be dangerous! At the moment I am running other peoples Notebooks, and using ChatGPT to explain how they work!

But when I try to launch Binder on my laptop I get all sorts of errors and recommendations to change the settings on my Chrome Browser, which I have done, but still nothing loads. I have read that support for Binder is dwindling, and I have been researching other solutions and see that there are several (e.g. Colab, Azure etc). What would you recommend as the easiest solution for the most robust cloud delivery?

I have also tried loading Docker on my laptop so that I can explore the functions locally, but that failed to because of a lack of the Hypervisor, which I am trying to work out how to fix . . . . .

If I can get it working, I would love to collaborate by producing shared examples and accompanying teaching materials!

Binder Launch Log:

Found built image, launching...
Launching server...
Server requested
2023-08-04T07:53:27.457820Z [Normal] Successfully assigned gesis/jupyter-badlands-2dmodel-2dbadlands-2ddocker-2dfxlcu63m to spko-css-app03
2023-08-04T07:53:28Z [Normal] Container image "jupyterhub/k8s-network-tools:3.0.0-beta.3" already present on machine
2023-08-04T07:53:28Z [Normal] Created container block-cloud-metadata
2023-08-04T07:53:28Z [Normal] Started container block-cloud-metadata
2023-08-04T07:53:29Z [Normal] Container image "gesiscss/binder-r2d-g5b5b759-badlands-2dmodel-2dbadlands-2ddocker-9cfeff:a7cfc027533bca695052954970a5aa5c82349d43" already present on machine
2023-08-04T07:53:29Z [Normal] Created container notebook
2023-08-04T07:53:30Z [Normal] Started container notebook
Spawn failed: Server at http://10.244.2.110:8888/binder/jupyter/user/badlands-model-badlands-docker-fxlcu63m/ didn't respond in 30 seconds
Launch attempt 1 failed, retrying...
Server requested
2023-08-04T07:54:10.380404Z [Normal] Successfully assigned gesis/jupyter-badlands-2dmodel-2dbadlands-2ddocker-2dmvnd9gg3 to spko-css-app03
2023-08-04T07:54:11Z [Normal] Container image "jupyterhub/k8s-network-tools:3.0.0-beta.3" already present on machine
2023-08-04T07:54:11Z [Normal] Created container block-cloud-metadata
2023-08-04T07:54:11Z [Normal] Started container block-cloud-metadata
2023-08-04T07:54:12Z [Normal] Container image "gesiscss/binder-r2d-g5b5b759-badlands-2dmodel-2dbadlands-2ddocker-9cfeff:a7cfc027533bca695052954970a5aa5c82349d43" already present on machine
2023-08-04T07:54:12Z [Normal] Created container notebook
2023-08-04T07:54:12Z [Normal] Started container notebook
Spawn failed: Server at http://10.244.2.111:8888/binder/jupyter/user/badlands-model-badlands-docker-mvnd9gg3/ didn't respond in 30 seconds
Launch attempt 2 failed, retrying...
Server requested
2023-08-04T07:55:00.023689Z [Normal] Successfully assigned gesis/jupyter-badlands-2dmodel-2dbadlands-2ddocker-2dlpcig04r to spko-css-app03
2023-08-04T07:55:00Z [Normal] Container image "jupyterhub/k8s-network-tools:3.0.0-beta.3" already present on machine
2023-08-04T07:55:00Z [Normal] Created container block-cloud-metadata
2023-08-04T07:55:01Z [Normal] Started container block-cloud-metadata
2023-08-04T07:55:02Z [Normal] Container image "gesiscss/binder-r2d-g5b5b759-badlands-2dmodel-2dbadlands-2ddocker-9cfeff:a7cfc027533bca695052954970a5aa5c82349d43" already present on machine
2023-08-04T07:55:02Z [Normal] Created container notebook
2023-08-04T07:55:02Z [Normal] Started container notebook

Have a look here...
#36

Generally the replies go in the open issues. re Binder link, no idea but it's the weekend now so you might need to wait a few days for someone to check. I'm just a user and occasional contributor.
re Docker and hypervisor, if it's a windows PC generally there's a bios setting to enable virtualization which you'll need, some of the AMD bios versions have a non-intuitive name for this. Then install WSL (windows system for linux) following the general docker howto's which are pretty thorough.

I had a look at the other binder link and that didn't work either. I have confirmed that Virtualisation is off for my machine (on windows). Trying to figure out how / if it can be turned on. Have managed to get into the BIOS yet

@GeoMattB Thanks for your help. No success on my workstation, which I defaulted to, because that is where all my data and seismic interpretation goes on. In a fit of frustration I decided to try opening the Binder and installing Docker on my laptop, and it all just worked!

Note to self: Upgrade workstation.

@GeoMattB Having managed to get the Demo Binder going, the first step fails because I don't have a MeshPro licence. Is that right?

That's really weird. That's not normal and may be a recent change by the author of meshplex.

Hi @Gurdiac,

Thank you @GeoMattB for jumping in during the weekend :-)
Indeed, it seems that there is an issue with the binder version. I am still working on it but I am unsure I will find an easy fix.

In the meantime, as you mentioned the idea of running it for teaching purposes, I have built different flavours of badlands docker images that you might find helpful:
1- docker pull badlandsmodel/badlands:conda-container / link
2- docker pull badlandsmodel/badlands:binder / link

And here is some documentation about badlands for teaching purposes: link to some examples

It is worth noting that the containers are pretty big (>2 GB, specially the conda one); this might be the reason why binder does not open it anymore. For teaching we recommend using Docker if possible.

I will try a last thing regarding the binder issue and will keep you posted on this.

A working binder version is available from here:

Binder

Once you have installed Docker Desktop for your operating system then enable the docker comand line (Docker CLI) and pull the goSPL Docker image from the terminal using the following:

I have no idea what that means or how to do it!

And the link above hasn't worked yet . . . . .

Found built image, launching...
Launching server...
Server requested
2023-08-07T13:38:15.246111Z [Normal] Successfully assigned ovh2/jupyter-badlands-2dmodel-2dbadlands-2dteaching-2dosb3lwjb to user-202211a-node-7cb28d
2023-08-07T13:38:18Z [Normal] Container image "jupyterhub/mybinder.org-tc-init:2020.12.4-0.dev.git.4289.h140cef52" already present on machine
2023-08-07T13:38:18Z [Normal] Created container tc-init
2023-08-07T13:38:18Z [Normal] Started container tc-init
2023-08-07T13:38:20Z [Normal] Pulling image "2lmrrh8f.gra7.container-registry.ovh.net/mybinder-builds/r2d-g5b5b759badlands-2dmodel-2dbadlands-2dteaching-0c3609:c5c004ee0ad981f9f5d52671a5724fdb337c51eb"
Spawn failed: Timeout
Launch attempt 1 failed, retrying...
Server requested
2023-08-07T13:47:50.314898Z [Normal] Successfully assigned ovh2/jupyter-badlands-2dmodel-2dbadlands-2dteaching-2dsdsuz3qg to user-202211a-node-198ed1
2023-08-07T13:47:51Z [Normal] Container image "jupyterhub/mybinder.org-tc-init:2020.12.4-0.dev.git.4289.h140cef52" already present on machine
2023-08-07T13:47:51Z [Normal] Created container tc-init
2023-08-07T13:47:51Z [Normal] Started container tc-init
2023-08-07T13:47:52Z [Normal] Pulling image "2lmrrh8f.gra7.container-registry.ovh.net/mybinder-builds/r2d-g5b5b759badlands-2dmodel-2dbadlands-2dteaching-0c3609:c5c004ee0ad981f9f5d52671a5724fdb337c51eb"

The link above works for me so it should be the case for everyone, try refreshing the page if it get stuck when pulling the image.

You could also try this one (should point to the same binder container):
Binder

One potential issue could be the web browser you are using and maybe you might want to try a different one such as Chrome or Firefox...

Regarding Docker CLI, this link explains what it is:
CLI link

Using the CLI for Docker is not required, as an alternative you could follow the video badlands_docker_install.mp4 in the link to some examples provided above.