Container supporting a mounted in matlab for use in Gitlab CI
To use this container in Gitlab you need to mount your local MATLAB installation into the container. This can be achieved by adding
"/path/to/MATLAB/:/usr/local/MATLAB/from-host"
to the volumes part under [runners.docker] in your /etc/gitlab-runner/config.toml.
Depending on your license you may also need to spoof your container's MAC address to match your license. Assuming the address corresponding to your license is stored inside a variable named HW_ADDRESS
, you can run
ip link set dev eth0 address $HW_ADDRESS
to set it inside the container. Make sure that your container is running in privileged
mode.
This is based on Benjamin Heasly's work. I just needed to modify the Dockerfile to make it usable in Gitlab CI.