Dockerfile 1.23 KB
Newer Older
1
FROM fedora:latest
2

3
4
RUN dnf upgrade -y
RUN dnf install -y \
5
    nano hostname hwloc procps-ng wget which tree dnf-plugins-core rpm-build \
6
    cmake make gcc gcc-c++ gcc-gfortran openmpi pkgconf lcov \
7
    munge munge-devel \
8
    #slurm slurm-slurmctld slurm-slurmd \
9
10
    libconfig-devel spdlog-devel doxygen graphviz python

11
12
13
14
15
16
17
18
19
20
21
22
# install Slurm with hacky "patch" to enable front end mode
RUN dnf download --source slurm
RUN rpm -i slurm*
WORKDIR /root/rpmbuild/SPECS
RUN sed -i "s/--enable-shared/--enable-shared --enable-front-end/" slurm.spec
RUN dnf builddep -y slurm.spec
RUN rpmbuild -bb slurm.spec
WORKDIR /root/rpmbuild/RPMS/x86_64
RUN dnf install -y slurm*.rpm
WORKDIR /
RUN rm -rf slurm*.rpm /root/rpmbuild

23
24
25
26
27
28
29
RUN groupadd slurm && \
    useradd -c "Slurm Workload Manager" -s /sbin/nologin -g slurm slurm           && \
    mkdir -p /var/spool/slurm{,ctl}d && chown slurm:slurm /var/spool/slurm{,ctl}d && \
    mkdir -p /var/run/slurm          && chown slurm:slurm /var/run/slurm          && \
    mkdir -p /var/log/slurm          && chown slurm:slurm /var/log/slurm
    #imkdir -p /var/log/slurm{,ctl}d.log  && chown slurm:slurm /var/log/slurm{,ctl}d.log

30
31
32
33
34
COPY docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["bash"]