mirror of
https://github.com/ClusterCockpit/cc-docker.git
synced 2025-07-23 13:21:43 +02:00
Added new Docker Compose setup
This commit is contained in:
107
Dockerfile
Normal file
107
Dockerfile
Normal file
@@ -0,0 +1,107 @@
|
||||
FROM rockylinux:8
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/giovtorres/slurm-docker-cluster" \
|
||||
org.opencontainers.image.title="slurm-docker-cluster" \
|
||||
org.opencontainers.image.description="Slurm Docker cluster on Rocky Linux 8" \
|
||||
org.label-schema.docker.cmd="docker-compose up -d" \
|
||||
maintainer="Giovanni Torres"
|
||||
|
||||
ARG SLURM_TAG=slurm-21-08-6-1
|
||||
ARG GOSU_VERSION=1.11
|
||||
|
||||
RUN set -ex \
|
||||
&& yum makecache \
|
||||
&& yum -y update \
|
||||
&& yum -y install dnf-plugins-core \
|
||||
&& yum config-manager --set-enabled powertools \
|
||||
&& yum -y install \
|
||||
wget \
|
||||
bzip2 \
|
||||
cmake \
|
||||
perl \
|
||||
gcc \
|
||||
gcc-c++\
|
||||
git \
|
||||
gnupg \
|
||||
make \
|
||||
munge \
|
||||
munge-devel \
|
||||
nano \
|
||||
python3-devel \
|
||||
python3-pip \
|
||||
python3 \
|
||||
mariadb-server \
|
||||
mariadb-devel \
|
||||
psmisc \
|
||||
bash-completion \
|
||||
vim-enhanced \
|
||||
http-parser-devel \
|
||||
json-c-devel \
|
||||
&& yum clean all \
|
||||
&& rm -rf /var/cache/yum
|
||||
|
||||
RUN alternatives --set python /usr/bin/python3
|
||||
|
||||
RUN pip3 install Cython nose
|
||||
|
||||
RUN set -ex \
|
||||
&& 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.asc" \
|
||||
&& export GNUPGHOME="$(mktemp -d)" \
|
||||
&& gpg --batch --keyserver hkps://keys.openpgp.org --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
|
||||
|
||||
WORKDIR /home
|
||||
|
||||
RUN set -x \
|
||||
&& git clone https://gitlab.hrz.tu-chemnitz.de/pika/pika-packages.git \
|
||||
&& git clone https://github.com/nats-io/nats.c.git \
|
||||
&& git clone -b ${SLURM_TAG} --single-branch --depth=1 https://github.com/SchedMD/slurm.git \
|
||||
&& pushd 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/slurmdbd.conf.example /etc/slurm/slurmdbd.conf.example \
|
||||
&& install -D -m644 contribs/slurm_completion_help/slurm_completion.sh /etc/profile.d/slurm_completion.sh \
|
||||
&& popd \
|
||||
&& cp -r slurm /opt \
|
||||
&& groupadd -r --gid=990 slurm \
|
||||
&& useradd -r -g slurm --uid=990 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
|
||||
|
||||
COPY slurm-prep-pika_v4.c /home/slurm-prep-pika_v4.c
|
||||
COPY makefile /home/makefile
|
||||
|
||||
COPY slurm.conf /etc/slurm/slurm.conf
|
||||
COPY slurmdbd.conf /etc/slurm/slurmdbd.conf
|
||||
RUN set -x \
|
||||
&& chown slurm:slurm /etc/slurm/slurmdbd.conf \
|
||||
&& chmod 600 /etc/slurm/slurmdbd.conf
|
||||
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["slurmdbd"]
|
Reference in New Issue
Block a user