Skip to content

Commit

Permalink
set memlock unlimted in slurmd via entrypoint hack using ulimit
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Jul 5, 2023
1 parent 96b50b6 commit b0c1dcc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ RUN mkdir /etc/sysconfig/slurm \
&& chown -R slurm:slurm /var/*/slurm* \
&& groupadd --gid=1000 rocky \
&& useradd -g rocky --uid=1000 rocky \
&& usermod -p '*' rocky \
&& echo -e "*\thard\tmemlock\tunlimited" >> /etc/security/limits.conf
&& usermod -p '*' rocky

VOLUME /etc/slurm
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
Expand Down
3 changes: 3 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ fi

if [ "$1" = "slurmd" ]
then
echo "---> Setting memlock unlimited ..."
ulimit -Hl unlimited

echo "---> Starting the MUNGE Authentication service (munged) ..."
gosu munge /usr/sbin/munged

Expand Down
2 changes: 2 additions & 0 deletions slurm-cluster-chart/templates/slurmd-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
- mountPath: /tempmounts/munge.key
name: munge-key-secret
subPath: munge.key
securityContext:
privileged: true
restartPolicy: Always
volumes:
- name: slurm-jobdir
Expand Down

0 comments on commit b0c1dcc

Please sign in to comment.