Skip to content

Commit 71cb6a4

Browse files
committed
closes #2: Update to R2021b and bug fixes
1 parent c1f6955 commit 71cb6a4

File tree

4 files changed

+273
-221
lines changed

4 files changed

+273
-221
lines changed

matlab-vnc/Dockerfile

Lines changed: 73 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Copyright 2020 The MathWorks, Inc.
1+
# Copyright 2021 The MathWorks, Inc.
22

33
# Argument shared across multi-stage build to hold location of installed MATLAB
44
ARG BASE_ML_INSTALL_LOC=/tmp/matlab-install-location
55

6-
# Replace "matlab" with the Docker image that contains MATLAB
6+
# Replace "mathworks/matlab:r2021b" with the Docker image that contains MATLAB
77
# 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
99
ARG BASE_ML_INSTALL_LOC
1010

1111
# 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
3333
# Add MATLAB to the path
3434
RUN ln -s /usr/local/MATLAB/bin/matlab /usr/local/bin/matlab
3535

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
3840
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 \
8799
&& apt-get clean \
88100
&& apt-get -y autoremove \
89101
&& rm -rf /var/lib/apt/lists/*
@@ -101,12 +113,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \
101113
xorg \
102114
xubuntu-icon-theme \
103115
curl \
116+
xscreensaver \
117+
&& apt-get remove -y gnome-screensaver \
104118
&& apt-get clean \
105119
&& apt-get -y autoremove \
106120
&& rm -rf /var/lib/apt/lists/*
107121

108122
# 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' \
110124
| tar -zxf - -C /usr/local --strip=2
111125

112126
# noVNC provides VNC over browser capability
@@ -119,6 +133,11 @@ RUN mkdir -p ${NOVNC_PATH} \
119133
| tar -zxf - -C ${NOVNC_PATH} --strip=1 \
120134
&& chown -R ${NB_USER}:users ${NOVNC_PATH}
121135

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+
122141
# Change user to jovyan from root as we do not want any changes to be made as root in the container
123142
USER $NB_USER
124143

matlab-vnc/Dockerfile.mounted

Lines changed: 70 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,69 @@ USER root
88
# Put MATLAB on the PATH
99
RUN ln -s /usr/local/MATLAB/bin/matlab /usr/local/bin/matlab
1010

11-
# Install MATLAB dependencies
12-
# Reference: https://github.com/mathworks-ref-arch/container-images/tree/master/matlab-deps
11+
## Install MATLAB dependencies
12+
# Please update this list for the version of MATLAB you are using.
13+
# Listed below are the dependencies of R2021b for Ubuntu 20.04
14+
# Reference: https://github.com/mathworks-ref-arch/container-images/tree/master/matlab-deps/r2021b
1315
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install --no-install-recommends -y \
14-
libasound2 \
15-
libatk1.0-0 \
16-
libc6 \
17-
libcairo-gobject2 \
18-
libcairo2 \
19-
libcrypt1 \
20-
libcups2 \
21-
libdbus-1-3 \
22-
libfontconfig1 \
23-
libgdk-pixbuf2.0-0 \
24-
libgstreamer-plugins-base1.0-0 \
25-
libgstreamer1.0-0 \
26-
libgtk-3-0 \
27-
libnspr4 \
28-
libnss3 \
29-
libpam0g \
30-
libpango-1.0-0 \
31-
libpangocairo-1.0-0 \
32-
libpangoft2-1.0-0 \
33-
libpython2.7 \
34-
libpython3.8 \
35-
libselinux1 \
36-
libsm6 \
37-
libsndfile1 \
38-
libtcl8.6 \
39-
libuuid1 \
40-
libx11-6 \
41-
libx11-xcb1 \
42-
libxcb1 \
43-
libxcomposite1 \
44-
libxcursor1 \
45-
libxdamage1 \
46-
libxext6 \
47-
libxfixes3 \
48-
libxft2 \
49-
libxi6 \
50-
libxinerama1 \
51-
libxrandr2 \
52-
libxrender1 \
53-
libxt6 \
54-
libxtst6 \
55-
libxxf86vm1 \
56-
zlib1g \
57-
xkb-data \
58-
procps \
59-
ca-certificates \
60-
sudo \
61-
locales locales-all \
16+
ca-certificates \
17+
libasound2 \
18+
libatk-bridge2.0-0 \
19+
libatk1.0-0 \
20+
libatspi2.0-0 \
21+
libc6 \
22+
libcairo-gobject2 \
23+
libcairo2 \
24+
libcap2 \
25+
libcrypt1 \
26+
libcups2 \
27+
libdbus-1-3 \
28+
libdrm2 \
29+
libfontconfig1 \
30+
libgbm1 \
31+
libgdk-pixbuf2.0-0 \
32+
libglib2.0-0 \
33+
libgomp1 \
34+
libgstreamer-plugins-base1.0-0 \
35+
libgstreamer1.0-0 \
36+
libgtk-3-0 \
37+
libnspr4 \
38+
libnss3 \
39+
libodbc1 \
40+
libpam0g \
41+
libpango-1.0-0 \
42+
libpangocairo-1.0-0 \
43+
libpangoft2-1.0-0 \
44+
libpython3.9 \
45+
libsm6 \
46+
libsndfile1 \
47+
libssl1.1 \
48+
libuuid1 \
49+
libx11-6 \
50+
libx11-xcb1 \
51+
libxcb-dri3-0 \
52+
libxcb1 \
53+
libxcomposite1 \
54+
libxcursor1 \
55+
libxdamage1 \
56+
libxext6 \
57+
libxfixes3 \
58+
libxft2 \
59+
libxi6 \
60+
libxinerama1 \
61+
libxrandr2 \
62+
libxrender1 \
63+
libxt6 \
64+
libxtst6 \
65+
libxxf86vm1 \
66+
locales \
67+
locales-all \
68+
make \
69+
net-tools \
70+
procps \
71+
sudo \
72+
unzip \
73+
zlib1g \
6274
&& apt-get clean \
6375
&& apt-get -y autoremove \
6476
&& rm -rf /var/lib/apt/lists/*
@@ -76,12 +88,14 @@ RUN export DEBIAN_FRONTEND=noninteractive \
7688
xorg \
7789
xubuntu-icon-theme \
7890
curl \
91+
xscreensaver \
92+
&& apt-get remove -y gnome-screensaver \
7993
&& apt-get clean \
8094
&& apt-get -y autoremove \
8195
&& rm -rf /var/lib/apt/lists/*
8296

8397
# Install tigervnc to /usr/local
84-
RUN curl -sSfL 'https://bintray.com/tigervnc/stable/download_file?file_path=tigervnc-1.10.1.x86_64.tar.gz' \
98+
RUN curl -sSfL 'https://sourceforge.net/projects/tigervnc/files/stable/1.10.1/tigervnc-1.10.1.x86_64.tar.gz/download' \
8599
| tar -zxf - -C /usr/local --strip=2
86100

87101
# noVNC provides VNC over browser capability
@@ -94,6 +108,11 @@ RUN mkdir -p ${NOVNC_PATH} \
94108
| tar -zxf - -C ${NOVNC_PATH} --strip=1 \
95109
&& chown -R ${NB_USER}:users ${NOVNC_PATH}
96110

111+
# JOVYAN is the default user in jupyter/base-notebook.
112+
# JOVYAN is being set to be passwordless.
113+
# This allows users to easily wake the desktop when it goes to sleep.
114+
RUN passwd $NB_USER -d
115+
97116
# Switch back to notebook user
98117
USER $NB_USER
99118

0 commit comments

Comments
 (0)