While Code Ocean includes many different base environments, offering out of the box support for a long list of languages and frameworks, your code might have requirements that fall outside that list. Don't despair! Most non-proprietary software packages can be installed on Code Ocean through the Run Environment screen.
Which language should I choose for my compute capsule?
If you're setting up a new language, the "Other" base environment would make the most sense. If, in addition to the, you need proprietary software, such as MATLAB or Stata, start from the proprietary language; if you need a GPU, start from the language that offers native GPU support (currently C/C++, MATLAB, Python, and Lua).
Installing a language using the package manager: R, Python
An analysis may use scripts in multiple languages. In those cases, start from an existing language base environment (e.g. MATLAB) and install the additional language using the apt-get package management functionality in the Run Environment. For R or Python, the right packages are
python-pip , respectively. Once you add these packages the commands
python will become available, as will the R installers (CRAN, GitHub) or
Installing a language using the Setup Script: C#
Take Mono as an example. Mono is an open source implementation of Microsoft's .NET Framework.
The Mono project website has instructions for installing Mono on Ubuntu 16.04. Start by choosing the "Other" language, which will get you a minimal Ubuntu environment. Since it requires more complicated setup – namely, adding the Mono repository – prior to package installation, use the Setup Script. You can use the commands from Mono's instructions as is, with one small change:
sudo is not required (nor available by default) on Code Ocean. The resulting Setup Script, with
sudo taken out, looks like this:
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | tee /etc/apt/sources.list.d/mono-official.list
apt-get update -qq && apt-get install -y mono-devel
As a side note, in order to build your project and run it, use the following commands in your
run.sh shell script:
xbuild /p:Configuration=Release myproject.csproj
Via apt-get, install
gnat , and
zlib1g-dev . Then, use the following setup script:
git clone https://github.com/tgingold/ghdl
make && make install
Via apt-get, install
wget , then run the following setup script:
for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt `lsb_release -cs` nightly"; done | tee /etc/apt/sources.list.d/openmodelica.list
curl -s http://build.openmodelica.org/apt/openmodelica.asc | apt-key add -
apt update -qq && apt install -y openmodelica
What if I need proprietary software that isn't currently supported?
Contact us at firstname.lastname@example.org and we will look into it.