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

Note that 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.

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 should work for you on an average server, with a relatively small number of trusted, non-malicious users. In contrast, the online service cocalc.com uses a proprietary 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!
  5. The license is AGPLv3. If you want to run CoCalc internally and cannot use AGPLv3 licensed code at your organization, contact us and we can sell you a version of the Docker image under a different license.

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 is running Ubuntu 18.04, 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.

Additional Licensing and Support Available

CoCalc code is licensed under AGPLv3. If you would instead like a business-friendly MIT license instead, please contact help@cocalc.com, and we will sell you a 1-year license for $799. This also includes some support, though with no guarantees (that costs more). We do have several happy paying customers as of Sept 2019.

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 approximately weekly. Weekly 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 and listed below: