-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
91 lines (82 loc) · 3.07 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
FROM ubuntu:16.04
# docker build -t srcc/smanage .
FROM centos:7
ARG SLURM_VERSION=17.11.8
ENV SLURM_DOWNLOAD_URL=https://download.schedmd.com/slurm/slurm-${SLURM_VERSION}.tar.bz2
ARG GOSU_VERSION=1.10
RUN yum makecache fast \
&& yum -y install epel-release \
&& yum -y install \
wget \
gtk2.0 \
bzip2 \
perl \
gcc \
gcc-c++\
vim-enhanced \
git \
make \
munge \
munge-devel \
python-devel \
python-pip \
python34 \
python34-devel \
python34-pip \
mariadb-server \
mariadb-devel \
psmisc \
bash-completion \
&& yum clean all \
&& rm -rf /var/cache/yum
RUN pip install Cython nose \
&& pip3 install Cython nose
RUN set -x \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \
# && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \
# && export GNUPGHOME="$(mktemp -d)" \
# && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
# && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
# && rm -rf $GNUPGHOME /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true
RUN groupadd -r slurm --gid=995 && useradd -r -g slurm --uid=995 slurm
RUN yum -y install gtk2-devel
RUN set -x \
&& wget -O slurm.tar.bz2 "$SLURM_DOWNLOAD_URL" \
&& mkdir /usr/local/src/slurm \
&& tar jxf slurm.tar.bz2 -C /usr/local/src/slurm --strip-components=1 \
&& rm slurm.tar.bz2 \
&& cd /usr/local/src/slurm \
&& ./configure --enable-debug --prefix=/usr --sysconfdir=/etc/slurm \
--with-mysql_config=/usr/bin --libdir=/usr/lib64 \
&& make install \
&& install -D -m644 etc/cgroup.conf.example /etc/slurm/cgroup.conf.example \
&& install -D -m644 etc/slurm.conf.example /etc/slurm/slurm.conf.example \
&& install -D -m644 etc/slurm.epilog.clean /etc/slurm/slurm.epilog.clean \
&& install -D -m644 etc/slurmdbd.conf.example /etc/slurm/slurmdbd.conf.example \
&& install -D -m644 contribs/slurm_completion_help/slurm_completion.sh /etc/profile.d/slurm_completion.sh \
&& cd \
&& rm -rf /usr/local/src/slurm \
&& mkdir /etc/sysconfig/slurm \
/var/spool/slurmd \
/var/run/slurmd \
/var/run/slurmdbd \
/var/lib/slurmd \
/var/log/slurm \
/data \
&& touch /var/lib/slurmd/node_state \
/var/lib/slurmd/front_end_state \
/var/lib/slurmd/job_state \
/var/lib/slurmd/resv_state \
/var/lib/slurmd/trigger_state \
/var/lib/slurmd/assoc_mgr_state \
/var/lib/slurmd/assoc_usage \
/var/lib/slurmd/qos_usage \
/var/lib/slurmd/fed_mgr_state \
&& chown -R slurm:slurm /var/*/slurm* \
&& /sbin/create-munge-key
RUN mkdir -p /code
ADD smanage.sh /code
RUN chmod u+x /code/smanage.sh
ENTRYPOINT ["/bin/bash" , "/code/smanage.sh"]