wiki:docker

Version 17 (modified by downs, 4 years ago) ( diff )

--

Install ISSM on Docker

Installing Matlab on Docker

To install Matlab on Docker you will nee to download the full installation files, in addition to a file installation key and license file. Under an academic headcount license through the Unversity of Montana. First create a directory to contain the installation files

mkdir issm_docker
mkdir issm_docker/license

I was able to get an installation key and license by logging into my Mathworks account, going to the "install and activate" tab, then clicking "activate to retrieve license file" under related tasks. From there, click "active a computer". The Matlab license is tied to a specific username and MAC address, so in order to get it to work in docker, specify the login name as "root", which is the Docker default, and set the mac address to 02:42:ac:11:00:02. The license MAC address needs to match the MAC address in the Docker container, which can be specified at runtime.

Submit this form, then click no on the next page.

Click continue and you will receive a file installation key and license file. Place the license file in issm_docker/license.

cp license.lic issm_docker/license

Next you will need to download all Matlab installation files. Download the Matlab installer from the license center, unzip the directory, and run the installer. Login with your Mathworks account, accept the license agreement, then under advanced options, select "I want to download without installing." I downloaded the installation files to issm_docker/R2020b.

Once installation files have been downloaded, create a file called installer_options.txt in issm_docker with

fileInstallationKey=<key>

agreeToLicense=yes

outputFile=log.txt

replacing <key> with the file installation key you received. You should now have an issm_docker directory containing a licenses folder with the downloaded license, an installer_options.txt file, and a subdirectory containing the matlab install files (e.g. R2020b).

Create a dockerfile in issm_docker with the following contents

# Use the official image as a parent image.
FROM ubuntu:20.04

# Instal x11 libs
RUN apt-get update
RUN apt-get install -y libx11-6
RUN apt-get install -y emacs
#RUN apt-get -y install sudo
#RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

# Copy the file from your host to your current location.
WORKDIR /home/issm

# Add matlab files
ADD R2020b ./R2020b

# Install Matlab
WORKDIR /home/issm/R2020b
RUN ./install -inputFile  installer_options.txt

WORKDIR /usr/local/MATLAB/R2020b/
ADD licenses ./licenses

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.