1
- # Copyright 2020 The MathWorks, Inc.
1
+ # Copyright 2021 The MathWorks, Inc.
2
2
3
3
# Argument shared across multi-stage build to hold location of installed MATLAB
4
4
ARG BASE_ML_INSTALL_LOC=/tmp/matlab-install-location
5
5
6
- # Replace "matlab" with the Docker image that contains MATLAB
6
+ # Replace "mathworks/ matlab:r2021b " with the Docker image that contains MATLAB
7
7
# MATLAB should be available on the path in the Docker image
8
- FROM matlab AS matlab-install-stage
8
+ FROM mathworks/ matlab:r2021b AS matlab-install-stage
9
9
ARG BASE_ML_INSTALL_LOC
10
10
11
11
# Run code to locate a MATLAB install in the base image and softlink
@@ -33,57 +33,69 @@ COPY --from=matlab-install-stage ${BASE_ML_INSTALL_LOC} /usr/local/MATLAB
33
33
# Add MATLAB to the path
34
34
RUN ln -s /usr/local/MATLAB/bin/matlab /usr/local/bin/matlab
35
35
36
- # Install MATLAB dependencies
37
- # Reference: https://github.com/mathworks-ref-arch/container-images/tree/master/matlab-deps
36
+ # # Install MATLAB dependencies
37
+ # Please update this list for the version of MATLAB you are using.
38
+ # Listed below are the dependencies of R2021b for Ubuntu 20.04
39
+ # Reference: https://github.com/mathworks-ref-arch/container-images/tree/master/matlab-deps/r2021b
38
40
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install --no-install-recommends -y \
39
- libasound2 \
40
- libatk1.0-0 \
41
- libc6 \
42
- libcairo-gobject2 \
43
- libcairo2 \
44
- libcrypt1 \
45
- libcups2 \
46
- libdbus-1-3 \
47
- libfontconfig1 \
48
- libgdk-pixbuf2.0-0 \
49
- libgstreamer-plugins-base1.0-0 \
50
- libgstreamer1.0-0 \
51
- libgtk-3-0 \
52
- libnspr4 \
53
- libnss3 \
54
- libpam0g \
55
- libpango-1.0-0 \
56
- libpangocairo-1.0-0 \
57
- libpangoft2-1.0-0 \
58
- libpython2.7 \
59
- libpython3.8 \
60
- libselinux1 \
61
- libsm6 \
62
- libsndfile1 \
63
- libtcl8.6 \
64
- libuuid1 \
65
- libx11-6 \
66
- libx11-xcb1 \
67
- libxcb1 \
68
- libxcomposite1 \
69
- libxcursor1 \
70
- libxdamage1 \
71
- libxext6 \
72
- libxfixes3 \
73
- libxft2 \
74
- libxi6 \
75
- libxinerama1 \
76
- libxrandr2 \
77
- libxrender1 \
78
- libxt6 \
79
- libxtst6 \
80
- libxxf86vm1 \
81
- zlib1g \
82
- xkb-data \
83
- procps \
84
- ca-certificates \
85
- sudo \
86
- locales locales-all \
41
+ ca-certificates \
42
+ libasound2 \
43
+ libatk-bridge2.0-0 \
44
+ libatk1.0-0 \
45
+ libatspi2.0-0 \
46
+ libc6 \
47
+ libcairo-gobject2 \
48
+ libcairo2 \
49
+ libcap2 \
50
+ libcrypt1 \
51
+ libcups2 \
52
+ libdbus-1-3 \
53
+ libdrm2 \
54
+ libfontconfig1 \
55
+ libgbm1 \
56
+ libgdk-pixbuf2.0-0 \
57
+ libglib2.0-0 \
58
+ libgomp1 \
59
+ libgstreamer-plugins-base1.0-0 \
60
+ libgstreamer1.0-0 \
61
+ libgtk-3-0 \
62
+ libnspr4 \
63
+ libnss3 \
64
+ libodbc1 \
65
+ libpam0g \
66
+ libpango-1.0-0 \
67
+ libpangocairo-1.0-0 \
68
+ libpangoft2-1.0-0 \
69
+ libpython3.9 \
70
+ libsm6 \
71
+ libsndfile1 \
72
+ libssl1.1 \
73
+ libuuid1 \
74
+ libx11-6 \
75
+ libx11-xcb1 \
76
+ libxcb-dri3-0 \
77
+ libxcb1 \
78
+ libxcomposite1 \
79
+ libxcursor1 \
80
+ libxdamage1 \
81
+ libxext6 \
82
+ libxfixes3 \
83
+ libxft2 \
84
+ libxi6 \
85
+ libxinerama1 \
86
+ libxrandr2 \
87
+ libxrender1 \
88
+ libxt6 \
89
+ libxtst6 \
90
+ libxxf86vm1 \
91
+ locales \
92
+ locales-all \
93
+ make \
94
+ net-tools \
95
+ procps \
96
+ sudo \
97
+ unzip \
98
+ zlib1g \
87
99
&& apt-get clean \
88
100
&& apt-get -y autoremove \
89
101
&& rm -rf /var/lib/apt/lists/*
@@ -101,12 +113,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \
101
113
xorg \
102
114
xubuntu-icon-theme \
103
115
curl \
116
+ xscreensaver \
117
+ && apt-get remove -y gnome-screensaver \
104
118
&& apt-get clean \
105
119
&& apt-get -y autoremove \
106
120
&& rm -rf /var/lib/apt/lists/*
107
121
108
122
# Install tigervnc to /usr/local
109
- RUN curl -sSfL 'https://bintray.com/ tigervnc/stable/download_file?file_path= tigervnc-1.10.1.x86_64.tar.gz' \
123
+ RUN curl -sSfL 'https://sourceforge.net/projects/ tigervnc/files/ stable/1.10.1/ tigervnc-1.10.1.x86_64.tar.gz/download ' \
110
124
| tar -zxf - -C /usr/local --strip=2
111
125
112
126
# noVNC provides VNC over browser capability
@@ -119,6 +133,11 @@ RUN mkdir -p ${NOVNC_PATH} \
119
133
| tar -zxf - -C ${NOVNC_PATH} --strip=1 \
120
134
&& chown -R ${NB_USER}:users ${NOVNC_PATH}
121
135
136
+ # JOVYAN is the default user in jupyter/base-notebook.
137
+ # JOVYAN is being set to be passwordless.
138
+ # This allows users to easily wake the desktop when it goes to sleep.
139
+ RUN passwd $NB_USER -d
140
+
122
141
# Change user to jovyan from root as we do not want any changes to be made as root in the container
123
142
USER $NB_USER
124
143
0 commit comments