Commit 511a2170 authored by Pape, David (FWCC) - 139658's avatar Pape, David (FWCC) - 139658
Browse files

Adding initial setup.

parent 007d26f4
Pipeline #19579 passed with stage
in 4 minutes and 35 seconds
image: docker:latest
services:
- docker:dind
variables:
CONTAINER_TAG: registry.hzdr.de/pape58/slurm-in-docker:fedora-31
build_and_push:
stage: deploy
only:
- master
tags:
- dind
before_script:
- apk add make
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.hzdr.de
script:
- make push
FROM fedora:31
RUN dnf upgrade -y && \
dnf install -y \
nano hostname hwloc procps-ng wget which tree \
cmake make gcc g++ gfortran openmpi pkgconf lcov \
munge munge-devel \
slurm slurm-slurmctld slurm-slurmd \
libconfig-devel spdlog-devel doxygen graphviz python
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["bash"]
CONTAINER_NAME = registry.hzdr.de/pape58/slurm-in-docker
CONTAINER_TAG = fedora-31
CONTAINER = ${CONTAINER_NAME}:${CONTAINER_TAG}
.PHONY: build push
build: Dockerfile docker-entrypoint.sh
docker build -t ${CONTAINER} .
push: build
docker push ${CONTAINER}
#!/bin/bash
#set -e
_munge_setup() {
create-munge-key -f > /dev/null
sudo -u munge munged
}
# TODO: Create slurm user
_slurm_setup() {
cat > /etc/slurm/slurm.conf <<EOF
#
# See the slurm.conf man page for more information.
#
SlurmctldHost=$(hostname -s)
AuthType=auth/munge # auth_none.so not available on Fedora
EnforcePartLimits=NO
MpiDefault=pmix
ProctrackType=proctrack/pgid
ReturnToService=0
SlurmctldPidFile=/var/run/slurm/slurmctld.pid
SlurmctldPort=6817
SlurmdPidFile=/var/run/slurm/slurmd.pid
SlurmdPort=6818
SlurmdSpoolDir=/var/spool/slurm/d
SlurmUser=root
SlurmdUser=root
StateSaveLocation=/var/spool/slurm/ctld
SwitchType=switch/none
TaskPlugin=task/none
# TIMERS
InactiveLimit=0
KillWait=30
MinJobAge=300
SlurmctldTimeout=120
SlurmdTimeout=300
Waittime=0
# SCHEDULING
FastSchedule=1
SchedulerType=sched/backfill
SelectType=select/linear
# JOB PRIORITY
# LOGGING AND ACCOUNTING
AccountingStorageType=accounting_storage/none
AccountingStoreJobComment=YES
ClusterName=myhpc # TODO: Think of something better?
JobCompType=jobcomp/none
JobAcctGatherFrequency=30
JobAcctGatherType=jobacct_gather/none
SlurmctldDebug=3
SlurmdDebug=3
MailProg=/bin/true
# COMPUTE NODES
NodeName=$(hostname -s) CPUs=$(nproc) State=UNKNOWN
PartitionName=docker Nodes=$(hostname -s) Default=YES MaxTime=INFINITE State=UP
EOF
slurmctld
slurmd
}
_main() {
_munge_setup
_slurm_setup
if [[ "${1:0:1}" = "-" ]]; then
echo "Please pass a program name to the container!"
exit 1
else
exec "$@"
fi
}
_main "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment