Skip to content

The kitchen sink with SnapPy, SageMath, Regina, and friends

Notifications You must be signed in to change notification settings

3-manifolds/sagedocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SageMath Docker Image

This is an attempt to standardize and streamline computational work that combines SnapPy, SageMath, and friends via a custom Docker image that is based around Ubuntu 20.04 LTS and the latest and greatest SageMath. It is indirectly derived from the official sagemath/sagemath Docker image, but includes SnapPy, and the Python interfaces to Regina, and PHCPack.

A container instance of this image starts a shell as the user sage with all the environment variables set as if you had executed sage -sh.

This image takes a long time to build, even on a fast computer, since it compiles SageMath from source, and weighs in at 5.2 GB (1.6 GB compressed). We recommend you use the posted image on DockerHub via:

docker pull computop/sage
docker run -it computop/sage

Here, the first command downloads the image from DockerHub and the second starts a container that is running said image. Moving files between the container and the rest of the world can be done using scp or having the container mount a local directory as in this example:

docker run -it --mount type=bind,source="$HOME/Dropbox/linux_share",target=/home/sage/linux_share computop/sage

where the directory linux_share inside the user's Dropbox folder is shared.

If you want to use Sage's Jupyter notebook interface, start the container via:

docker run -it -p 127.0.0.1:8888:8888 computop/sage

and in said container type:

sage --notebook

and then point your computer's web browser to http://localhost:8888. If you want to use the beta JupyterLab, which will eventually superseded Jupyter, you can instead do:

sage --notebook jupyterlab

In JupyterLab, you have access not just to notebooks but also Python consoles and shell terminal windows.

Python 2 versus Python 3

The images for SageMath 8.9 and older use Python 2 (and Ubuntu 16.04) and those for SageMath 9.0 and newer use Python 3 (and Ubuntu 18.04 or 20.04). You can always request Docker run a particular version of the image, for example if you want SageMath 8.9 do:

docker run -it computop/sage:8.9

Components

A partial list of included software:

We no longer include HIKMOT as it is not compatible with Python 3.

Building

To build from scratch, which takes 1.3 hours using all 8 cores on a Mac Pro:

docker build --tag=computop/sage sage

If compiling Sage fails, make sure the Docker application is configured so that it can use at least 4GB of memory.

Put out on DockerHub:

docker push computop/sage

About

The kitchen sink with SnapPy, SageMath, Regina, and friends

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published