SageMath docker image + mybinder.org

50 views
Skip to first unread message

de...@benjamin-hackl.at

unread,
Nov 16, 2022, 5:53:41 PM11/16/22
to sage-devel
Hey all,

I really liked the way of making code accessible via a repository or gist containing a bunch of notebooks together with a simple Dockerfile that has not much more than "FROM sagemath/sagemath:version" in it -- but this is something that broke down a while ago (https://github.com/sagemath/sage-binder-env/issues/9, couldn't find a trac ticket).

Now, I don't speak Jupyter well enough to understand why it doesn't still work, but I've found that if, instead of using notebook from SageMath's venv, one installs Python 3 + Jupyter separately in the container and links the SageMath kernel to it, the docker images *can* still be used with mybinder. I've left details here: https://github.com/sagemath/sage-binder-env/issues/9#issuecomment-1317769194, mybinder link: https://mybinder.org/v2/gist/behackl/a5d25c901ec557565f99331b130f09a2/HEAD.

Is there something particular about SageMath's Jupyter notebook configuration that might cause this; any ideas?

Best,
Benjamin

Eric Gourgoulhon

unread,
Nov 17, 2022, 3:41:11 AM11/17/22
to sage-devel
Hi,
Le mercredi 16 novembre 2022 à 23:53:41 UTC+1, de...@benjamin-hackl.at a écrit :
Hey all,

I really liked the way of making code accessible via a repository or gist containing a bunch of notebooks together with a simple Dockerfile that has not much more than "FROM sagemath/sagemath:version" in it -- but this is something that broke down a while ago (https://github.com/sagemath/sage-binder-env/issues/9, couldn't find a trac ticket).

Now, I don't speak Jupyter well enough to understand why it doesn't still work, but I've found that if, instead of using notebook from SageMath's venv, one installs Python 3 + Jupyter separately in the container and links the SageMath kernel to it, the docker images *can* still be used with mybinder. I've left details here: https://github.com/sagemath/sage-binder-env/issues/9#issuecomment-1317769194, mybinder link: https://mybinder.org/v2/gist/behackl/a5d25c901ec557565f99331b130f09a2/HEAD.

Thanks for sharing! It's very nice that we can have mybinder + Sage working again!

Eric.

Eric Gourgoulhon

unread,
Nov 17, 2022, 4:44:16 AM11/17/22
to sage-devel
PS: I confirm that your solution works for the notebooks of https://sagemanifolds.obspm.fr/examples.html
The start up is quite long, but if one is patient enough, it works!

enriqu...@gmail.com

unread,
Nov 17, 2022, 2:33:10 PM11/17/22
to sage-devel
There is also a working solution with conda (see the environment.yml file in https://github.com/sagemath/sage-binder-env)
Reply all
Reply to author
Forward
0 new messages