Changes between Version 20 and Version 21 of docker
- Timestamp:
- 11/17/20 15:49:54 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
docker
v20 v21 22 22 [[Image(shot2.png,800px)]] 23 23 24 Click continue and you will receive a file installation key and license file. Place the license file in issm_matlab. 25 24 Click 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 26 25 {{{ 27 26 #!sh 28 cp license.lic issm_matlab29 }}}30 31 Creat a text file called installer_input.txt with the following contents32 {{{33 #!sh34 35 27 fileInstallationKey=<key> 36 37 28 agreeToLicense=yes 38 39 29 outputFile=log.txt 40 41 30 licensePath=../license.lic 42 43 31 44 32 }}} 45 33 replacing <key> with the file installation key you received. 46 34 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/matlab35 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_matlab/matlab 48 36 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 37 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: 50 38 51 39 {{{ 52 40 #!sh 53 # U se the official image as a parent image.41 # Ubuntu parent image 54 42 FROM ubuntu:20.04 55 43 … … 74 62 RUN echo 'alias matlab="/usr/local/MATLAB/R2020a/bin/matlab -nojvm -nodesktop"' >> ~/.bashrc 75 63 }}} 64 65 Note: 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. 76 66 77 67 From the docker_matlab direcotry build the Docker image. … … 103 93 }}} 104 94 105 = Installing Matlab on Docker = 95 = Installing ISSM on Docker = 96 97 98 To 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 103 FROM ubuntu/matlab 104 105 # Dependencies 106 RUN apt-get install -y libtool cmake autotools-dev curl python python-numpy g++ gfortran unzip patch git 107 108 # Add ISSM source 109 WORKDIR /home/issm/ 110 ADD trunk-jpl ./trunk-jpl 111 112 # Set environment var 113 ENV ISSM_DIR=/home/issm/trunk-jpl/ 114 RUN ["/bin/bash", "-c", "source $ISSM_DIR/etc/environment.sh"] 115 116 # Install external packages 117 WORKDIR $ISSM_DIR/externalpackages/petsc 118 RUN ./install-3.12-linux.sh 119 WORKDIR $ISSM_DIR/externalpackages/triangle 120 RUN ./install-linux.sh 121 WORKDIR $ISSM_DIR/externalpackages/chaco 122 RUN ./install.sh 123 WORKDIR $ISSM_DIR/externalpackages/m1qn3 124 RUN ./install.sh 125 WORKDIR $ISSM_DIR/externalpackages/semic 126 RUN ./install.sh 127 128 # Configure and run 129 WORKDIR $ISSM_DIR 130 RUN autoreconf -ivf 131 RUN ./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 146 RUN make 147 RUN make install 148 149 # A fix to get stuff to run in matlab 150 WORKDIR /usr/local/MATLAB/R2020a/sys/os/glnxa64/ 151 RUN mkdir OLD 152 RUN mv libstdc++.so* OLD/ 153 RUN mv libgcc_s.so* OLD/ 154 RUN ln -s /usr/lib/libstd* . 155 RUN ln -s /lib/libgcc_s.so* . 156 157 WORKDIR /home/issm/ 158 }}}
![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)