Exporting capsules and reproducing results on your local machine
Steps for running code as you find it on Code Ocean locally.
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.md
contains specific instructions for how to reproduce the capsule's results locally, with notes on the necessary prerequisites and commands./code
has your capsule's code, and/data
has your capsule's data./metadata
has a file calledmetadata.yml
The
/environment
folder contains, at a minimum, a file calledDockerfile
. If you've employed a postInstall script, you will see apostInstall
file as well.
Dockerfile
is the recipe for rebuilding your capsule's computational environment locally. Each will begin with a line like:
This tells the Dockerfile from where to pull the Docker image. If the environment has been customized further, there will be more commands like:
and so on.
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.
Last updated