How to use the hpccm.primitives.baseimage.baseimage function in hpccm

To help you get started, we’ve selected a few hpccm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_distro_centos(self):
        """Base image Linux distribution specification"""
        b = baseimage(image='foo', _distro='centos')
        self.assertEqual(hpccm.config.g_linux_distro, linux_distro.CENTOS)
        self.assertEqual(hpccm.config.g_linux_version, StrictVersion('7.0'))
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_detect_ubuntu(self):
        """Base image Linux distribution detection"""
        b = baseimage(image='ubuntu:sixteen')
        self.assertEqual(hpccm.config.g_linux_distro, linux_distro.UBUNTU)
        self.assertEqual(hpccm.config.g_linux_version, StrictVersion('16.04'))
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_invalid_ctype(self):
        """Invalid container type specified"""
        b = baseimage()
        with self.assertRaises(RuntimeError):
            str(b)
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_detect_ppc64le(self):
        """Base image CPU architecture detection"""
        b = baseimage(image='ppc64le/centos:7')
        self.assertEqual(hpccm.config.g_cpu_arch, cpu_arch.PPC64LE)
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_value_singularity(self):
        """Image name is specified"""
        b = baseimage(image='foo')
        self.assertEqual(str(b),
r'''BootStrap: docker
From: foo
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_detect_centos_8(self):
        """Base image Linux distribution detection"""
        b = baseimage(image='centos:8')
        self.assertEqual(hpccm.config.g_linux_distro, linux_distro.CENTOS)
        self.assertEqual(hpccm.config.g_linux_version, StrictVersion('8.0'))
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_detect_ubi7(self):
        """Base image Linux distribution detection"""
        b = baseimage(image='nvidia/cuda:10.1-devel-ubi7')
        self.assertEqual(hpccm.config.g_linux_distro, linux_distro.RHEL)
        self.assertEqual(hpccm.config.g_linux_version, StrictVersion('7.0'))
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_detect_ubuntu16(self):
        """Base image Linux distribution detection"""
        b = baseimage(image='nvidia/cuda:9.0-devel-ubuntu16.04')
        self.assertEqual(hpccm.config.g_linux_distro, linux_distro.UBUNTU)
        self.assertEqual(hpccm.config.g_linux_version, StrictVersion('16.04'))
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_arch_aarch64(self):
        """Base image CPU architecture specification"""
        b = baseimage(image='foo', _arch='aarch64')
        self.assertEqual(hpccm.config.g_cpu_arch, cpu_arch.AARCH64)
github NVIDIA / hpc-container-maker / test / test_baseimage.py View on Github external
def test_as_singularity26(self):
        """Docker specified image naming"""
        b = baseimage(image='foo', _as='dev')
        self.assertEqual(str(b),
r'''BootStrap: docker
From: foo