Esempio n. 1
0
    def test_runtime(self):
        """Runtime"""
        p = slurm_pmi2()
        r = p.runtime()
        self.assertEqual(
            r, r'''# SLURM PMI2
COPY --from=0 /usr/local/slurm-pmi2 /usr/local/slurm-pmi2''')
Esempio n. 2
0
    def test_defaults_ubuntu(self):
        """Default slurm_pmi2 building block"""
        p = slurm_pmi2()
        self.assertEqual(
            str(p), r'''# SLURM PMI2 version 19.05.5
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        bzip2 \
        file \
        make \
        perl \
        tar \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://download.schedmd.com/slurm/slurm-19.05.5.tar.bz2 && \
    mkdir -p /var/tmp && tar -x -f /var/tmp/slurm-19.05.5.tar.bz2 -C /var/tmp -j && \
    cd /var/tmp/slurm-19.05.5 &&   ./configure --prefix=/usr/local/slurm-pmi2 && \
    make -C contribs/pmi2 install && \
    rm -rf /var/tmp/slurm-19.05.5.tar.bz2 /var/tmp/slurm-19.05.5''')
Esempio n. 3
0
    def test_ldconfig(self):
        """ldconfig option"""
        p = slurm_pmi2(ldconfig=True, version='19.05.4')
        self.assertEqual(
            str(p), r'''# SLURM PMI2 version 19.05.4
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        bzip2 \
        file \
        make \
        perl \
        tar \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://download.schedmd.com/slurm/slurm-19.05.4.tar.bz2 && \
    mkdir -p /var/tmp && tar -x -f /var/tmp/slurm-19.05.4.tar.bz2 -C /var/tmp -j && \
    cd /var/tmp/slurm-19.05.4 &&   ./configure --prefix=/usr/local/slurm-pmi2 && \
    make -C contribs/pmi2 install && \
    echo "/usr/local/slurm-pmi2/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig && \
    rm -rf /var/tmp/slurm-19.05.4.tar.bz2 /var/tmp/slurm-19.05.4''')