This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xpra.def
46 lines (39 loc) · 2.19 KB
/
xpra.def
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
Bootstrap: debootstrap
OSVersion: bionic
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
%environment
# Sets up environment for module use
# --> requires /shared to be bound
MODULE_VERSION=3.2.6
MODULEPATH=/shared/ucl/apps/modulefiles/core:/shared/ucl/apps/modulefiles/applications:/shared/ucl/apps/modulefiles/libraries:/shared/ucl/apps/modulefiles/compilers:/shared/ucl/apps/modulefiles/development:/shared/ucl/apps/modulefiles/bundles
MODULE_VERSION_STACK=3.2.6
MODULESHOME=/shared/ucl/apps/modules/3.2.6/Modules/3.2.6
export MODULE_VERSION MODULEPATH MODULE_VERSION_STACK MODULESHOME
module ()
{
eval `/shared/ucl/apps/modules/3.2.6/Modules/$MODULE_VERSION/bin/modulecmd bash $*`
}
%post
cat >>/etc/apt/sources.list <<EOF
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
EOF
apt-get -y update
# Numpy is apparently required for certain parts of Xpra to work properly
apt-get -y install xpra xterm less python-numpy python3-numpy
printf "#!/bin/sh\nxpra start --systemd-run=no --user=\$USER --start-via-proxy=no --start-on-connect=xterm --notifications=no \"\$@\"\n" >> /usr/bin/custom-xpra-server-start
printf "#!/bin/sh\nxpra attach --opengl=no --no-printing --notifications=no --webcam=no\n \"\$@\"" >> /usr/bin/custom-xpra-attach
chmod +x /usr/bin/custom-xpra-server-start /usr/bin/custom-xpra-attach
%help
This is a Singularity container intended to run Xpra on UCL central HPC clusters.
It is Ubuntu-based, and contains an installation of Xpra and two scripts to abbreviate some awkward commands:
custom-xpra-server-start
custom-xpra-attach