Exporting capsules and reproducing results on your local machine
Steps for running code as you find it on Code Ocean locally.
Was this helpful?
Steps for running code as you find it on Code Ocean locally.
Was this helpful?
Code Ocean allows authors and readers to download an entire . 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 called metadata.yml
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.
The /environment
folder contains, at a minimum, a file called . If you've employed a , you will see a postInstall
file as well.