CoCalc Docker Image

About the CoCalc Docker Image

Not only does CoCalc let you use all open source math software in your browser, but CoCalc itself is open source. This means you can run CoCalc on your own laptop or server.

The CoCalc Docker image lets you:

  • locally run:
    • Sage worksheets

    • Jupyter notebooks with R, Sage, and Python 2 & 3 kernels

    • Julia programs

  • edit LaTeX documents and markdown locally

  • learn about how CoCalc works

Files edited with the Docker image are fully compatible with online CoCalc. You can upload files from your Docker image to your cocalc.com account and work on them there. Files from cocalc.com will run in the Docker image as well, but you will need to ensure that any required packages and libraries are also installed locally.

Our blog article CoCalc On-Premise has introductory information about the CoCalc Docker image, a.k.a. “CoCalc Docker”.

Purchasing a Business-Friendly License

The default license for CoCalc Docker is AGPLv3. If you want to run CoCalc internally and cannot use AGPLv3 licensed code at your organization, a version of the Docker image is available for purchase under a different license. See CoCalc Docker at CoCalc - On Premises Offerings or email help@cocalc.com for more information.

Limitations

  1. Unlike the cocalc.com service, the Docker image doesn’t isolate projects from each other. There are no resource limitations between different projects.

  2. The Docker image has no provisions to scale horizontally. The Docker image may be useful if you have a small number of trusted, non-malicious users. In contrast, the online service cocalc.com uses a proprietary resource management system based on kubernetes that provides scalability, fault isolation, and resilience. Contact us at help@cocalc.com if you are interested in running CoCalc with kubernetes infrastructure.

  3. The software stack behind the cocalc.com service is several hundred gigabytes of well-tested code and data. In comparison, the Docker image provides a small subset of that stack, including SageMath and LaTeX. You can extend it on your own, though, by either installing more into the container or by amending the Dockerfile.

  4. SageMath, Inc. doesn’t prioritize supporting the Docker image, which means that if you ask a question about it, or make a support request, we likely won’t have time to answer. Please set your expectations accordingly (but see below for alternatives). On the other hand, if you are willing to fully compensate us for our time, then we can likely be very helpful!

Questions

I’m working on a collaborative project on cocalc.com and the scripts we’re using will very likely exceed the allotted server time for my cocalc.com account. Can I run the Docker image of CoCalc on my own machine, but still enable access by my collaborators remotely?

Yes, you definitely can! The CoCalc team does exactly this in some special cases (e.g., for Sage Days workshops). Follow the directions here: sagemathinc/cocalc-docker. Be sure to make your account an admin and set an “account creation token” so that only you and your collab can make accounts on the server.

What support is available for the CoCalc Docker image?

If you want professional-level support for running the server from us, send email to help@cocalc.com. There are also mailing lists for general community discussion described below.

Is Anaconda available in the CoCalc Docker image?

The Docker image does NOT currently include Anaconda at all. If you need it, you’ll have to install it yourself. This isn’t difficult, since the Docker image runs a recent release of Ubuntu, and it is easy to install Anaconda into Ubuntu.

What about compatibility with the operating system on my local computer?

The CoCalc Docker image is completely isolated from your main Linux system. It can’t mess up anything installed there! It uses the exact same Linux kernel, but otherwise has minimal overhead (it is very much not a virtual machine). Docker is designed to not touch or break anything related to your OS.

How much disk space is needed for the CoCalc Docker image?

About 12 GB. Remember, the Docker image includes a full LaTeX and Sage install, which is pretty big.

Getting Started

Detailed instructions to get the image up and running are at the github repo for sagemathinc/cocalc-docker.

Online Mailing Lists and Open Issues

For additional news and support, we recommend joining the following lists:

Security Status

The CoCalc Docker image is not blatantly insecure from outside attack: the database has a long random password, user accounts are separate, encrypted SSL communication is used by default, etc. That said, please observe the following:

Warning

A determined user with an account can easily access or change files of other users in the same container! Use this for personal use, behind a firewall, or with an account creation token, so that only other people you trust create accounts. Don’t make one of these publicly available with important data in it and no account creation token! See issue 2031. Basically, use the CoCalc Docker image only with people you trust.

Updates to the CoCalc Docker Image

The CoCalc Docker image is updated several times a year. Updates incorporate all features and bug fixes that have been merged into the CoCalc GitHub code repository master branch at the time of the build.

Other updates, such as new versions of Sagemath, Julia, and other additional software, happen less frequently but will be announced on the CoCalc Docker mailing list.