-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
65 lines (59 loc) · 2.97 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM ubuntu:18.04 as intermediate
###############################################################################################
MAINTAINER Ivan E. Cao-Berg <icaoberg@alumni.cmu.edu>
LABEL Description="Ubuntu 18.04 + MATLAB MCR 2019a"
LABEL Vendor="Computational Biology Department at Carnegie Mellon University"
LABEL Web="http://linus.cbd.cs.cmu.edu"
LABEL Version="2019a"
###############################################################################################
###############################################################################################
# UPDATE OS AND INSTALL TOOLS
USER root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get install -y build-essential git \
unzip \
xorg \
wget \
tree \
curl
RUN apt-get upgrade -y
###############################################################################################
###############################################################################################
# INSTALL MATLAB MCR 2017A
USER root
RUN echo "Downloading Matlab MCR 2019a"
RUN mkdir /mcr-install && \
mkdir /opt/mcr
RUN cd /mcr-install && \
wget -nc --quiet https://ssd.mathworks.com/supportfiles/downloads/R2019a/Release/5/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019a_Update_5_glnxa64.zip && \
cd /mcr-install && \
echo "Unzipping container" && \
unzip -q MATLAB_Runtime_R2019a_Update_5_glnxa64.zip && \
./install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \
cd / && \
echo "Removing temporary files" && \
rm -rvf mcr-install
###############################################################################################
###############################################################################################
FROM ubuntu:18.04
COPY --from=intermediate /opt/mcr /opt/mcr
###############################################################################################
###############################################################################################
# CONFIGURE ENVIRONMENT VARIABLES FOR MCR
RUN mv -v /opt/mcr/v96/sys/os/glnxa64/libstdc++.so.6 /opt/mcr/v96/sys/os/glnxa64/libstdc++.so.6.old
ENV LD_LIBRARY_PATH /opt/mcr/v96/runtime/glnxa64:/opt/mcr/v96/bin/glnxa64:/opt/mcr/v96/sys/os/glnxa64
ENV XAPPLRESDIR /opt/mcr/v96/X11/app-defaults
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get install -y wget
###############################################################################################
###############################################################################################
# CONFIGURE ENVIRONMENT
ENV DEBIAN_FRONTEND noninteractive
ENV SHELL /bin/bash
ENV USERNAME murphylab
ENV UID 1000
RUN useradd -m -s /bin/bash -N -u $UID $USERNAME
RUN if [ ! -d /home/$USERNAME/ ]; then mkdir /home/$USERNAME/; fi
###############################################################################################