Skip to content

Instantly share code, notes, and snippets.

@mastbaum
Last active November 1, 2015 18:28
Show Gist options
  • Save mastbaum/47880202e4675e77af74 to your computer and use it in GitHub Desktop.
Save mastbaum/47880202e4675e77af74 to your computer and use it in GitHub Desktop.
Dockerfile for Ubuntu 14.04 SLURM
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"]
#!/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