forked from tyson-swetnam/cloudcompare-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularity
145 lines (124 loc) · 3.64 KB
/
Singularity
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
Bootstrap: docker
From: tswetnam/cloudcompare
%help
Run CloudCompare: $ CloudCompare
Run CC viewer: $ ccViewer
Run PDAL: pdalinfo
%apprun vncserver
exec vncserver "${@}"
%apprun vncpasswd
exec vncpasswd "${@}"
%apprun websockify
exec /opt/websockify/run "${@}"
%runscript
exec vncserver "${@}"
%environment
export PATH=/opt/TurboVNC/bin:/opt/VirtualGL/bin:${PATH}
%post
# Software versions
export TURBOVNC_VERSION=2.1.2
export VIRTUALGL_VERSION=2.5.2
export LIBJPEG_VERSION=1.5.2
# Get dependencies
apt-get update
apt-get install -y --no-install-recommends \
emacs \
vim \
nano \
lshw \
lsb-release \
bash-completion \
kmod \
iputils-ping \
net-tools \
ca-certificates \
locales \
curl \
gcc \
make \
wget \
ca-certificates \
xauth \
xfonts-base \
xkb-data \
x11-xkb-utils \
xorg \
openbox \
libc6-dev \
libxv1 \
libxv1:i386 \
mesa-utils \
mesa-utils-extra \
x11-apps \
dbus-x11 \
libglib2.0-tests \
git \
libxcb-keysyms1-dev \
apt-transport-https
# XFCE4 Desktop
apt-get install -y --no-install-recommends \
build-essential \
software-properties-common \
glib-2.0-dev \
libgtk2.0-dev \
libxfce4ui-1-dev \
xfce4 \
gtk3-engines-xfce \
xfce4-notifyd \
xfce4-taskmanager \
xfce4-terminal \
libgtk-3-bin
add-apt-repository ppa:rebuntu16/other-stuff
apt-get update
apt-get install -y xfce-theme-manager
# Configure default locale
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen en_US.utf8
/usr/sbin/update-locale LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Install TurboVNC
wget https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb -q
dpkg -i turbovnc_${TURBOVNC_VERSION}_amd64.deb
rm turbovnc_${TURBOVNC_VERSION}_amd64.deb
# Install VirtualGL
wget https://svwh.dl.sourceforge.net/project/libjpeg-turbo/${LIBJPEG_VERSION}/libjpeg-turbo-official_${LIBJPEG_VERSION}_amd64.deb
wget https://svwh.dl.sourceforge.net/project/virtualgl/${VIRTUALGL_VERSION}/virtualgl_${VIRTUALGL_VERSION}_amd64.deb
wget https://svwh.dl.sourceforge.net/project/virtualgl/${VIRTUALGL_VERSION}/virtualgl32_${VIRTUALGL_VERSION}_amd64.deb
dpkg -i libjpeg-turbo-official_${LIBJPEG_VERSION}_amd64.deb
dpkg -i virtualgl_${VIRTUALGL_VERSION}_amd64.deb
dpkg -i virtualgl32_${VIRTUALGL_VERSION}_amd64.deb
rm -f *.deb
# Install noVNC
cd /opt
git clone https://github.com/novnc/noVNC/
# Install websockify
apt-get update
apt-get install -y --no-install-recommends \
python \
python-numpy
mkdir -p /opt/websockify
wget https://github.com/novnc/websockify/archive/master.tar.gz -q -O - | tar xzf - -C /opt/websockify --strip-components=1
# NVIDIA Container Runtime
apt-get install -y gnupg2
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
tee /etc/apt/sources.list.d/nvidia-container-runtime.list
apt-get update
apt-get install -y nvidia-container-runtime
ldconfig
# NVIDIA Drivers
add-apt-repository ppa:graphics-drivers/ppa
apt update
apt install -y nvidia-396 nvidia-modprobe
# in-container bind points for shared filesystems
mkdir -p /extra /xdisk /uaopt /cm/shared /rsgrps
# Clean up
rm -rf /var/lib/apt/lists/*
%environment
export DISPLAY=$DISPLAY
%labels
MAINTAINER Tyson Lee Swetnam <[email protected]>
Version v0.1