-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
161 lines (151 loc) · 3.94 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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
FROM dockbuild/centos7-devtoolset4-gcc5:latest
ARG IMAGE
ENV DEFAULT_DOCKCROSS_IMAGE=${IMAGE}
ENV DISPLAY=:99
ENV MESA_GL_VERSION_OVERRIDE=3.2
ARG QT_ACCOUNT_LOGIN
ARG QT_ACCOUNT_PASSWORD
ARG DEBIAN_FRONTEND=noninteractive
RUN \
#
# Qt dependencies:
#
# * https://doc.qt.io/qt-5/linux-requirements.html
# * https://doc.qt.io/qt-5/supported-platforms-and-configurations.html
#
# IMPORTANT:
#
# * dependencies of Qt5MultimediaGstTools are not installed. These are
# "gstreamer1-plugins-good" and "gstreamer1-plugins-base" along with
# all video and image codecs.
#
yum install -y \
flex \
fontconfig \
freetype \
glib2 \
libICE \
libX11 \
libxcb \
libXext \
libXi \
libXrender \
libSM \
libxkbcommon-x11 \
libXt-devel \
libGLU-devel \
mesa-libOSMesa-devel \
mesa-libGL-devel \
mesa-libGLU-devel \
xcb-util-keysyms \
xcb-util-image \
xcb-util-wm \
xcb-util-renderutil \
&& \
#
# Dependencies of Qt installer qt-unified-linux-x64-online.run
yum install -y \
libwayland-cursor \
&& \
# Dependencies of Xvfb GLX environment
yum install -y \
xorg-x11-server-Xvfb \
xorg-x11-server-Xorg \
mesa-dri-drivers \
glx-utils\
&& \
#
# libQt5WebEngineCore
# * alsa-lib provides libasound.so.2
yum install -y \
alsa-lib \
libXcomposite \
libXcursor \
libXrandr \
libXtst \
mesa-libEGL \
&& \
#
# libQt5Multimedia
# * pulseaudio-libs-glib2 provides libpulse-mainloop-glib.so.0
# * pulseaudio-libs provides libpulse.so.0
#
yum install -y \
pulseaudio-libs \
pulseaudio-libs-glib2 \
&& \
#
# Slicer dependencies
#
yum install -y \
subversion \
&& \
#
# SlicerJupyter dependencies
#
yum install -y \
libuuid-devel \
&& \
#
# Download and install Qt: new Qt installer 4.0 CLI interface
#
cd /usr/src && \
curl -LO http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run && \
chmod u+x qt-unified-linux-x64-online.run && \
# See CLI parameters here: https://wiki.qt.io/Online_Installer_4.x
./qt-unified-linux-x64-online.run \
install \
qt.qt5.5152.gcc_64 \
qt.qt5.5152.qtscript \
qt.qt5.5152.qtscript.gcc_64 \
qt.qt5.5152.qtwebengine \
qt.qt5.5152.qtwebengine.gcc_64\
--root /opt/qt \
--email ${QT_ACCOUNT_LOGIN} \
--pw ${QT_ACCOUNT_PASSWORD} \
--verbose \
--platform minimal \
--accept-licenses \
--accept-obligations \
--confirm-command \
--auto-answer telemetry-question=No,AssociateCommonFiletypes=No,installationErrorWithCancel=Ignore,OverwriteTargetDirectory=No &&\
rm -f qt-unified-linux-x64-online.run && \
# Cleanup
#
find /opt/qt -maxdepth 1 -type f -exec rm -rf "{}" \; && \
find /opt/qt -type f -name "*.debug" -delete && \
find /opt/qt/5.15.2/gcc_64/bin -type f -executable -exec strip {} \; && \
rm -rf \
/opt/qt/dist \
/opt/qt/Docs \
/opt/qt/Examples \
/opt/qt/Tools \
&& \
#
# Cleanup
#
yum clean all
#
# (1) Add Qt root directory to the PATH. This allows CMake command
# 'find_package(Qt5 REQUIRED)` to succeed.
#
# (2) Set env. variable Qt5_DIR to support configuring project
# by explicitly passing -DQt5_DIR:PATH=${Qt5_DIR}
#
ENV PATH=/opt/qt/5.15.2/gcc_64/:${PATH} \
Qt5_DIR=/opt/qt/5.15.2/gcc_64/lib/cmake/Qt5
#Copy in new entrypoint
COPY entrypoint.sh /dockcross/
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG IMAGE
ARG VCS_REF
ARG VCS_URL
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name=$IMAGE \
org.label-schema.description="Base image for slicer/slicer-builds-deps and slicer/slicer-build" \
org.label-schema.url="http://www.slicer.org" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.schema-version="1.0" \
maintainer="3D Slicer Community <slicer-devel@bwh.harvard.edu>"