run slurmctld as user

Notice: also trying to run slurmd on execute nodes as user makes no
sense because it breaks sbatch. Furthermore there is another necessary
to run mpi jobs (just tried MpiDefault=none). I don't consider running
slurmd as root a good idea, but there seems to be no other choice at the
moment.
This commit is contained in:
2021-04-30 17:15:57 +02:00
parent f2cb9b2c6b
commit f7dd3bcf02
7 changed files with 39 additions and 9 deletions

View File

@@ -14,6 +14,12 @@ RUN chown root:root /usr/local/sbin/entrypoint.sh && \
ENTRYPOINT [ "/usr/local/sbin/entrypoint.sh" ]
ARG slurmuser=slurm
ENV slurmuser=${slurmuser}
RUN useradd -d /var/lib/slurm -m --no-log-init --system $slurmuser &&\
slurm-setuser -u $slurmuser -g $slurmuser -y
RUN yum install -y slurm-slurmd && \
yum clean all && rm -rf /var/cache/yum