Installing Modelica on Code Ocean

Installation through the apt-get package manager and the postInstall script.

Shahar Zaks avatar
Written by Shahar Zaks
Updated over a week ago
  1. Start a new capsule (an Ubuntu 16.04 or 18.04 base environment is best if you don't need any languages besides Modelica

  2. Run the following postInstall script:

#!/bin/bash
apt-get update && apt-get install -y lsb-release gnupg
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-key fingerprint
apt update -qq && apt install -y openmodelica
apt-get purge -y --autoremove lsb-release gnupg && rm -rf /var/lib/apt/lists/*


โ€‹

Did this answer your question?