Code Ocean allows authors and readers to download an entire compute capsule. Click the 'Capsule' tab in the menu and select 'Export':
This will prompt a download screen where you can download the environment template, metadata, code, and, optionally, the data. When you unzip this, you will see something like the following (this screenshot comes from a mac):
REPRODUCING.mdcontains specific instructions for how to reproduce the capsule's results locally, with notes on the necessary prerequisites and commands. If you have downloaded a published capsule, this document will point to the preserved Docker image in our registry.
/codehas your capsule's code, and
/datahas your capsule's data.
/metadatahas a file called
metadata.ymlthat will look something like this (for an unpublished capsule):
name: Cape Feare
- name: Sideshow Bob
- name: The Krusty the Clown Show
name: Sideshow Bob
Published capsules will have all of the information in the corresponding capsule's metadata pane.
/environmentfolder contains, at a minimum, a file called
Dockerfile. If you've employed a postInstall script, you will see a
postInstallfile as well. Other files may appear if, for instance, you use an additional PPA.
Dockerfile is the recipe for rebuilding your capsule's computational environment locally. Each will begin with a line like:
This tells the Dockerfile where to pull the Docker image from.
If the environment has been customized further, there will be more commands like:
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
and so on.
A word of caution:
Reproducing your results locally is likely to be less user-friendly than reproducing results on Code Ocean. Docker requires some familiarity with the command line.
Should you run into any issues, please don't hesitate to reach out to us through intercom or email@example.com.
From Docker's documentation, Get Started, Part 1: Orientation and setup.
Carl Boettiger and Dirk Eddelbuettel, " An Introduction to Rocker: Docker Containers for R."