Last active
November 1, 2015 18:28
-
-
Save mastbaum/47880202e4675e77af74 to your computer and use it in GitHub Desktop.
Dockerfile for Ubuntu 14.04 SLURM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
RUN apt-get update && apt-get -y install munge slurm-llnl | |
RUN mkdir -p /var/run/munge && \ | |
chown munge:munge /var/run/munge && \ | |
chmod 0700 /etc/munge && \ | |
chmod 0711 /var/lib/munge && \ | |
chmod 0700 /var/log/munge && \ | |
chmod 0755 /var/run/munge && \ | |
chmod g-w /var/log | |
RUN useradd -u 1000 alice | |
ADD start_slurm.sh /usr/bin/start_slurm.sh | |
EXPOSE 6818 | |
CMD ["/usr/bin/start_slurm.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Starting munged..." | |
chown munge:munge /etc/munge/munge.key | |
service munge start | |
echo "Updating scontrol..." | |
IP=`ifconfig eth0 | awk '/inet addr/{print substr($2,6)}'` | |
/usr/bin/scontrol update nodename=$HOSTNAME nodeaddr=$IP nodehostname=$HOSTNAME | |
echo "Starting slurmd..." | |
exec /usr/sbin/slurmd -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment