-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-novnc-salome
136 lines (118 loc) · 4.55 KB
/
Dockerfile-novnc-salome
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
ARG OS=debian
ARG DIST=buster
FROM ${OS}:${DIST}
ARG SALOME_PACKAGE=SALOME-8.4.0-LNCMI-MPI-DBtesting.tgz
ARG SALOME_INSTALLDIR=SALOME-8.4.0-LNCMI-MPI-DBtesting
ARG OS=debian
ARG DIST=buster
ARG GPGKEY=535D3508
# Setup demo environment variables
ENV HOME=/root \
DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
DISPLAY=:0.0 \
DISPLAY_WIDTH=1600 \
DISPLAY_HEIGHT=968
ARG DEBIAN_FRONTEND=noninteractive
ARG SALOME_PACKAGE=SALOME-8.4.0-LNCMI-MPI-DBtesting.tgz
ARG SALOME_INSTALLDIR=SALOME-8.4.0-LNCMI-MPI-DBtesting
RUN if [ "$OS" = "debian" ]; then \
if [ "$DIST" != "buster" ]; then \
echo "deb http://ftp.debian.org/debian $DIST-updates main" >> /etc/apt/sources.list; \
echo "deb http://ftp.debian.org/debian $DIST-backports main" >> /etc/apt/sources.list; \
fi ; \
perl -p -i'.bak' -e "s| main| main contrib non-free|g" /etc/apt/sources.list; \
fi && \
if [ $OS = "ubuntu" ]; then \
perl -p -i'.bak' -e "s| universe| restricted universe multiverse|g" /etc/apt/sources.list; \
fi
# Install git, supervisor, VNC, & X11 packages
RUN apt install -y \
procps net-tools \
wget curl \
emacs-nox vim nano \
lsb-release \
bash bash-completion \
fluxbox \
git \
socat \
supervisor \
x11vnc \
xterm \
xvfb \
mesa-utils mesa-utils-extra && \
apt clean -y
# Clone noVNC from github
RUN git clone https://github.com/kanaka/noVNC.git /root/noVNC \
&& rm -rf /root/noVNC/.git \
&& git clone https://github.com/kanaka/websockify /root/noVNC/utils/websockify \
&& rm -rf /root/noVNC/utils/websockify/.git \
&& apt purge -y git
# General requirements
RUN apt-get -qq update && \
apt-get -y upgrade && \
apt-get install -y \
python-minimal libxss1 \
bash-completion \
emacs vim nano \
lsb-release wget curl \
lshw \
firefox-esr \
mesa-utils binutils kmod iputils-ping net-tools \
libxmu6 libglu1-mesa libxft2 && \
apt-get -y clean
# Use Lncmi repository for Salome specific packages:
# add specific build for mpi salome version:
# OCE, Paraview, gmsh-tetgen, scotch, mumps, petsc, slepc, med-fichier, netgen, hdf5-1.8
# !!! Depends on VERSION !!!
# for 7.8 qt4, oce
# for 8.x qt5, opencascade7.x (7.0 for 8.2, 7.1 for 8.3, 7.2 for 8.4)
RUN apt-get -qq update && \
apt-get -y upgrade && \
apt-get -y --force-yes install gnupg curl && \
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv $GPGKEY && \
gpg --export --armor $GPGKEY | apt-key add - && \
mkdir -p /etc/apt/sources.list.d/ && \
echo "deb http://euler/~trophime/debian/ ${DIST} main" > /etc/apt/sources.list.d/lncmi.list && \
cat /etc/apt/sources.list.d/lncmi.list
apt-get -qq update && \
apt-get -y upgrade && \
apt-get install -y \
python-minimal libxss1 \
libxmu6 libglu1-mesa libxft2 \
libcos4-1 \
omniidl omniidl-python omniorb-idl omniorb-nameserver python-omniorb python-omniorb-omg \
paraview-python \
netgen libnglib-5.3.1 \
gmsh-tetgen libpastix-dev \
libqwt-qt5-6 \
libopencascade-visualization-dev libopencascade-ocaf-dev \
libqt5xml5 libqt5test5 libqt5sensors5 libqt5positioning5 libqt5multimediawidgets5 libqt5webengine5 libqt5webenginewidgets5 \
libboost-filesystem1.62.0 libboost-regex1.62.0 libboost-signals1.62.0 libboost-thread1.62.0 libboost-date-time1.62.0 libboost-chrono1.62.0 libboost-atomic1.62.0 \
python-sip python-pyqt5 \
graphviz \
valgrind \
openssh-client \
python-psutil python-memory-profiler && \
apt-get -y clean
# alternative use Salome Universal binaries
COPY ${SALOME_PACKAGE} /tmp/${SALOME_PACKAGE}
RUN mkdir -p /opt && \
cd /opt && \
tar zxf /tmp/${SALOME_PACKAGE} && \
rm -f /tmp/${SALOME_PACKAGE}
# Mount /opt/DISTENE as /opt/DISTENE
ENV DISTENE_LICENSE_FILE /opt/DISTENE/DLim/dlim8.key
ENV PATH /opt/${SALOME_INSTALLDIR}/:$PATH
ENV LD_LIBRARY_PATH /usr/lib/paraview:$LD_LIBRARY_PATH
# Install vglrun?
RUN wget https://sourceforge.net/projects/virtualgl/files/2.5.2/virtualgl_2.5.2_amd64.deb/download -O /tmp/virtualgl_2.5.2_amd64.deb && \
dpkg -i /tmp/virtualgl_2.5.2_amd64.deb && \
rm /tmp/virtualgl_2.5.2_amd64.deb
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Modify the launch script 'ps -p'
RUN sed -i -- "s/ps -p/ps -o pid | grep/g" /root/noVNC/utils/launch.sh
EXPOSE 8080
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]