docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

sagemath image: should it be built from source or from binaries?

Open nthiery opened this issue 9 years ago • 2 comments

Advantage of building from binaries:

  • Faster build (includes better candidate for an automated build on dockerhub)
  • Potentially smaller image (no need for gcc and other compilation tools)
  • No need to reimplement the post-build cleanup for reducing size that we do for our binary distribution
  • TODO: check the signature of the downloaded binary!

Advantage of source build:

  • Consistence with sagemath-devel; in particular we can share the sagemath-dependencies base image

nthiery avatar Feb 10 '16 16:02 nthiery

So I tried building an image using the sage binary package from AIMS. So this just used the ubuntu base image, added their PPA to the repository list, and then installed the sage package. Also followed up with an apt-git clean. The image still came out to 4.748 GB--certainly less than 7.3 GB but still a lot.

embray avatar Feb 16 '16 11:02 embray

Also, not sure if this is expected or a bug...

$ sage -t -a
init.sage does not exist ... creating
Traceback (most recent call last):
  File "/usr/lib/sagemath/local/bin/sage-list-packages", line 54, in <module>
    for p in os.listdir(SAGE_PKGS):
OSError: [Errno 2] No such file or directory: '/usr/lib/sagemath/build/pkgs'
no stored timings available
Running doctests with ID 2016-02-16-11-34-11-df9e8b1b.
Using --optional=sage
Doctesting entire Sage library.
Traceback (most recent call last):
  File "/usr/lib/sagemath/local/bin/sage-runtests", line 88, in <module>
    err = DC.run()
  File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/doctest/control.py", line 1035, in run
    self.expand_files_into_sources()
  File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/doctest/control.py", line 644, in expand_files_into_sources
    self.sources = [FileDocTestSource(path, self.options) for path in expand()]
  File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/doctest/sources.py", line 494, in __init__
    raise ValueError("unknown file extension %r"%ext)
ValueError: unknown file extension ''

embray avatar Feb 16 '16 11:02 embray