To upload code to Code Ocean, you first create a compute capsule for it to live in. The compute capsule will contain not only the code, but everything else that it needs to run, namely (1) any data, and (2) a specification of the computational environment – the specific versions of the operating system, packages, libraries, and any other artifacts your code depends on.
The compute capsule is the key to enabling computational reproducibility on Code Ocean. It allows us to guarantee that your published analysis or algorithm implementation will run the same way (barring random elements in your code), and reproduce your results, regardless of who runs it or when – today, tomorrow, or next year.
For the technically-inclined, at the core of the compute capsule is a Docker image (and Dockerfile), with an entire infrastructure built around it, and a set constraints enforced upon it in order to facilitate computational reproducibility in science. For details on accessing this Dockerfile, see Exporting capsules and reproducing results on your local machine.