optional packages and binder

46 views
Skip to first unread message

Enrique Artal

unread,
Oct 29, 2019, 12:13:34 PM10/29/19
to sage-support
I want to make available some of my notebooks in binder. I found very useful sage-binder-env but I ran into problems in a case where I needed an optional package, namely gap_packages. As stated I installed make package using the Dockerfile but the installation stops with an error in make all-toolchain. I guess I need to install more packages but I do not know which ones. Best regards, Enrique.

Vincent Delecroix

unread,
Oct 30, 2019, 3:44:27 AM10/30/19
to sage-s...@googlegroups.com, sage-devel
Dear Enrique,

It would be helpful to have the complete error message and the log
of the failed build. And if you know how to do that, you can open
a trac ticket.

Also, it would be nice to have docker images for Sage with most (if
not all) optional packages installed.

Vincent

Enrique Artal

unread,
Oct 30, 2019, 4:11:49 PM10/30/19
to sage-support
Cher Vincent,

I hope to add now enough additional info. I am using mybinder.org (I did not find another address); my Dockerfile is adapted from a file in sage-binder-env: 

FROM sagemath/sagemath:8.8
USER root
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends gcc build-essential make \
&& apt-get -qq clean
USER sage
RUN sage -i gap_packages
# Make sure the contents of the repository is in ${HOME}
COPY --chown=sage:sage . ${HOME}
In the original file the version was 8.6; 8.9 did not work. The whole log is:

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockerarcwd43e'...
HEAD is now at a95a550 Update Dockerfile
Using DockerBuildPack builder
Step 1/6 : FROM sagemath/sagemath:8.8
 ---> 8826a965812be...
Step 2/6 : USER root
 ---> Running in 5de1f0b3cfbb
Removing intermediate container 5de1f0b3cfbb
 ---> c39c95bbdcff
Step 3/6 : RUN apt-get -qq update  && apt-get -qq install -y --no-install-recommends gcc build-essential make  && apt-get -qq clean
 ---> Running in fe5e1e365ff8
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libgdbm3:amd64.
(Reading database ... 7609 files and directories currently installed.)
Preparing to unpack .../libgdbm3_1.8.3-13.1_amd64.deb ...
Unpacking libgdbm3:amd64 (1.8.3-13.1) ...
Selecting previously unselected package perl-modules-5.22.
Preparing to unpack .../perl-modules-5.22_5.22.1-9ubuntu0.6_all.deb ...
Unpacking perl-modules-5.22 (5.22.1-9ubuntu0.6) ...
Preparing to unpack .../libbz2-1.0_1.0.6-8ubuntu0.2_amd64.deb ...
Unpacking libbz2-1.0:amd64 (1.0.6-8ubuntu0.2) over (1.0.6-8) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libbz2-1.0:amd64 (1.0.6-8ubuntu0.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Selecting previously unselected package libperl5.22:amd64.
(Reading database ... 8846 files and directories currently installed.)
Preparing to unpack .../libperl5.22_5.22.1-9ubuntu0.6_amd64.deb ...
Unpacking libperl5.22:amd64 (5.22.1-9ubuntu0.6) ...
Selecting previously unselected package perl.
Preparing to unpack .../perl_5.22.1-9ubuntu0.6_amd64.deb ...
Unpacking perl (5.22.1-9ubuntu0.6) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../bzip2_1.0.6-8ubuntu0.2_amd64.deb ...
Unpacking bzip2 (1.0.6-8ubuntu0.2) ...
Selecting previously unselected package make.
Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Unpacking make (4.1-6) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.6_all.deb ...
Unpacking libdpkg-perl (1.18.4ubuntu1.6) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../xz-utils_5.1.1alpha+20120614-2ubuntu2_amd64.deb ...
Unpacking xz-utils (5.1.1alpha+20120614-2ubuntu2) ...
Selecting previously unselected package patch.
Preparing to unpack .../patch_2.7.5-1ubuntu0.16.04.2_amd64.deb ...
Unpacking patch (2.7.5-1ubuntu0.16.04.2) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.6_all.deb ...
Unpacking dpkg-dev (1.18.4ubuntu1.6) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...
Unpacking build-essential (12.1ubuntu2) ...
Setting up libgdbm3:amd64 (1.8.3-13.1) ...
Setting up perl-modules-5.22 (5.22.1-9ubuntu0.6) ...
Setting up libperl5.22:amd64 (5.22.1-9ubuntu0.6) ...
Setting up perl (5.22.1-9ubuntu0.6) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode
Setting up bzip2 (1.0.6-8ubuntu0.2) ...
Setting up make (4.1-6) ...
Setting up libdpkg-perl (1.18.4ubuntu1.6) ...
Setting up xz-utils (5.1.1alpha+20120614-2ubuntu2) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
Setting up patch (2.7.5-1ubuntu0.16.04.2) ...
Setting up dpkg-dev (1.18.4ubuntu1.6) ...
Setting up build-essential (12.1ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Removing intermediate container fe5e1e365ff8
 ---> fa9dc2999b1d
Step 4/6 : USER sage
 ---> Running in d86e77e74948
Removing intermediate container d86e77e74948
 ---> 6535d64a4eae
Step 5/6 : RUN sage -i gap_packages
 ---> Running in e012d50d35ae
make: *** No rule to make target 'all-toolchain'.  Stop.
Removing intermediate container e012d50d35ae
The command '/bin/sh -c sage -i gap_packages' returned a non-zero code: 2

I think the non-zero code is variable. Thanks, Enrique.

Vincent Delecroix

unread,
Oct 30, 2019, 4:23:01 PM10/30/19
to sage-s...@googlegroups.com
Estimado Enrique,

If you want to compile anything, you should be using development
docker image, that is

sagemath/sagemath-dev

(you can tag if 8.8 if you wish). Be careful that the image is
twice bigger. See the documentation at

https://hub.docker.com/u/sagemath/sagemath

Vincent

Enrique Artal

unread,
Oct 31, 2019, 9:49:45 PM10/31/19
to sage-support
Thanks for the type. It built the image (including gap_packages) but when pushing it to binder it failed because a wrong checksum of "usr/lib64/perl5/vendor_perl/Unicode/Collate/Locale/kok.pl"

Alexander Konovalov

unread,
Nov 1, 2019, 8:39:19 PM11/1/19
to sage-support
This is an example by Nicolas M. Thiéry which worked earlier this week: https://github.com/OpenDreamKit/demo-semigroup-representation-theory/blob/master/Dockerfile 

Hope it may help. Is your setup somewhere on GitHub?

Best wishes
Alex

Enrique Artal

unread,
Nov 1, 2019, 11:53:19 PM11/1/19
to sage-support
Yes:

Thanks for the link, I am going to try. Best wishes, Enrique.

Enrique Artal

unread,
Nov 2, 2019, 12:17:10 AM11/2/19
to sage-support
Thanks for the help to Alexander and Vincent. It works now (branch sage); I have no excuses to avoid to add more comments to the notebook. Best, Enrique.
Reply all
Reply to author
Forward
0 new messages