-
Notifications
You must be signed in to change notification settings - Fork 9
/
centos-xfce-vnc-gpu.def
66 lines (53 loc) · 1.68 KB
/
centos-xfce-vnc-gpu.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# This file is used to build an headles vnc image based on Centos
Bootstrap: docker
From: nvidia/cuda:10.1-cudnn7-devel-centos7
%environment
export LANG='en_US.UTF-8'
export LANGUAGE='en_US:en'
export LC_ALL='en_US.UTF-8'
export DEFAULTHOME=/headless
export TERM=xterm
export NO_VNC_DEFAULT_HOME=/headless/noVNC
export VNC_COL_DEPTH=24
export VNC_RESOLUTION=1280x1024
export VNC_PW=vncpassword
export VNC_VIEW_ONLY=false
%labels
MAINTAINER "chaofeng, [email protected]"
%files
./src/common/xfce/. /headless/
./src/common/scripts/vnc_startup.sh /opt/
./src/common/scripts/wm_startup.sh /opt/
./src/common/install/. /headless/install/
./src/centos/install/. /headless/install/
%post
export LANG='en_US.UTF-8'
export LANGUAGE='en_US:en'
export LC_ALL='en_US.UTF-8'
export DEFAULTHOME=/headless
export TERM=xterm
export NO_VNC_DEFAULT_HOME=/headless/noVNC
export VNC_COL_DEPTH=24
export VNC_RESOLUTION=1280x1024
export VNC_PW=vncpassword
export VNC_VIEW_ONLY=false
rm -rf /etc/yum.repos.d/cuda*
rm -rf /etc/yum.repos.d/nvidia*
### Add all install scripts for further steps
ls $DEFAULTHOME/install
find $DEFAULTHOME/install -name '*.sh' -exec chmod a+x {} +
### Install some common tools
ls $DEFAULTHOME/install
$DEFAULTHOME/install/tools.sh
### Install xvnc-server & noVNC - HTML5 based VNC viewer
$DEFAULTHOME/install/tigervnc.sh
$DEFAULTHOME/install/no_vnc.sh
### Install firefox and chrome browser
$DEFAULTHOME/install/firefox.sh
### Install xfce UI
$DEFAULTHOME/install/xfce_ui.sh
### configure startup
chmod -R 777 $DEFAULTHOME
rm -rf $DEFAULTHOME/install/
chmod -R 777 /opt/vnc_startup.sh
chmod -R 777 /opt/wm_startup.sh