To manually download and install software that isn't currently available through a package manager, or to precisely specify the order of operations, you can use the Setup Script to run any commands that you could run on a Linux system (e.g. curl , unzip /tar , git clone ).

Because the script will be run as part of the build phase, any commands will be run once, and will henceforth be cached as part of your capsule's custom environment. See Monitoring and inspecting the result of the environment setup phase for more information.

Note that many software installation instructions will specify commands such as sudo apt-get install python-dev; sudo  is unnecessary on Code Ocean.

Example: downloading and building a GitHub dependency

# download and extract in one go
curl -L https://github.com/user/repo/archive/package_version.tar.gz | tar xz

# NOTE: extract the file locally and inspect the folder structure to find out the name of the folder
cd folder_name

# build with CMake
cmake .
# and/or make
make && make install

Example: installing a MATLAB toolbox

See Installing user-provided MATLAB toolboxes.

Did this answer your question?