Changes between Version 20 and Version 21 of docker


Ignore:
Timestamp:
11/17/20 15:49:54 (5 years ago)
Author:
downs
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • docker

    v20 v21  
    2222[[Image(shot2.png,800px)]]
    2323
    24 Click continue and you will receive a file installation key and license file. Place the license file in issm_matlab.
    25 
     24Click continue and you will receive a file installation key and license file. Place the license file in issm_matlab.Then, create a text file called installer_input.txt with the following contents
    2625{{{
    2726#!sh
    28 cp license.lic issm_matlab
    29 }}}
    30 
    31 Creat a text file called installer_input.txt with the following contents
    32 {{{
    33 #!sh
    34 
    3527fileInstallationKey=<key>
    36 
    3728agreeToLicense=yes
    38 
    3929outputFile=log.txt
    40 
    4130licensePath=../license.lic
    42 
    4331
    4432}}}
    4533replacing <key> with the file installation key you received.
    4634
    47 Next, we need all Matlab install files. Download the Matlab installer from the license center and run it. Login with your Mathworks account, accept the license agreement, then under advanced options, select "I want to download without installing." Download the files to docker_issm/matlab
     35Next, we need all Matlab install files. Download the Matlab installer from the license center and run it. Login with your Mathworks account, accept the license agreement, then under advanced options, select "I want to download without installing." Download the files to docker_matlab/matlab
    4836
    49 The issm_matlab directory should now have a license file license.lic, the installer_input.txt file, and a directory called matlab with the install files. Create a dockerfile called DOCKERFILE in issm_matlab with the following contents
     37The issm_matlab directory should now have a license file license.lic, the installer_input.txt file, and a directory called matlab with the install files. Create a dockerfile called DOCKERFILE in issm_matlab with the following contents:
    5038
    5139{{{
    5240#!sh
    53 # Use the official image as a parent image.
     41# Ubuntu parent image
    5442FROM ubuntu:20.04
    5543
     
    7462RUN echo 'alias matlab="/usr/local/MATLAB/R2020a/bin/matlab -nojvm -nodesktop"' >> ~/.bashrc
    7563}}}
     64
     65Note: You can probably remove the line to install Emacs somehow. I did this because it's my preferred editor, and incidentally it installed some other dependencies that made the Matlab install actually work.
    7666
    7767From the docker_matlab direcotry build the Docker image.
     
    10393}}}
    10494
    105 = Installing Matlab on Docker =
     95= Installing ISSM on Docker =
     96
     97
     98To install ISSM from source, create a new directory called docker_issm. We'll build off the Matlab image built previously. Copy the ISSM trunk into docker_issm. Create a new Docker file in the directory called DOCKERFILE.
     99
     100{{
     101#!sh
     102# Build on the matlab image
     103FROM ubuntu/matlab
     104
     105# Dependencies
     106RUN apt-get install -y libtool cmake autotools-dev curl python python-numpy g++ gfortran unzip patch git
     107
     108# Add ISSM source
     109WORKDIR /home/issm/
     110ADD trunk-jpl ./trunk-jpl
     111
     112# Set environment var
     113ENV ISSM_DIR=/home/issm/trunk-jpl/
     114RUN ["/bin/bash", "-c", "source $ISSM_DIR/etc/environment.sh"]
     115
     116# Install external packages
     117WORKDIR $ISSM_DIR/externalpackages/petsc
     118RUN ./install-3.12-linux.sh
     119WORKDIR $ISSM_DIR/externalpackages/triangle
     120RUN ./install-linux.sh
     121WORKDIR $ISSM_DIR/externalpackages/chaco
     122RUN ./install.sh
     123WORKDIR $ISSM_DIR/externalpackages/m1qn3
     124RUN ./install.sh
     125WORKDIR $ISSM_DIR/externalpackages/semic
     126RUN ./install.sh
     127
     128# Configure and run
     129WORKDIR $ISSM_DIR
     130RUN autoreconf -ivf
     131RUN ./configure \
     132        --prefix=$ISSM_DIR \
     133        --with-matlab-dir="/usr/local/MATLAB/R2020a/" \
     134        --with-fortran-lib="-L/usr/lib/x86_64-linux-gnu/ -lgfortran" \
     135        --with-triangle-dir="$ISSM_DIR/externalpackages/triangle/install" \
     136        --with-mpi-include="$ISSM_DIR/externalpackages/petsc/install/include"  \
     137        --with-mpi-libflags="-L$ISSM_DIR/externalpackages/petsc/install/lib/ -lmpi -lmpicxx -lmpifort" \
     138        --with-petsc-dir="$ISSM_DIR/externalpackages/petsc/install" \
     139        --with-metis-dir="$ISSM_DIR/externalpackages/petsc/install" \
     140        --with-blas-lapack-dir="$ISSM_DIR/externalpackages/petsc/install" \
     141        --with-scalapack-dir="$ISSM_DIR/externalpackages/petsc/install/" \
     142        --with-mumps-dir="$ISSM_DIR/externalpackages/petsc/install/" \
     143        --with-m1qn3-dir="$ISSM_DIR/externalpackages/m1qn3/install" \
     144        --with-numthreads=2
     145
     146RUN make
     147RUN make install
     148
     149# A fix to get stuff to run in matlab
     150WORKDIR /usr/local/MATLAB/R2020a/sys/os/glnxa64/
     151RUN mkdir OLD
     152RUN mv libstdc++.so* OLD/
     153RUN mv libgcc_s.so* OLD/
     154RUN ln -s /usr/lib/libstd* .
     155RUN ln -s /lib/libgcc_s.so* .
     156
     157WORKDIR /home/issm/
     158}}}