How to use the hpccm.templates.envvars 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 / hpccm / building_blocks / mpich.py View on Github external
import posixpath
import re
from copy import copy as _copy

import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.ldconfig

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.generic_autotools import generic_autotools
from hpccm.building_blocks.packages import packages
from hpccm.common import linux_distro
from hpccm.primitives.comment import comment
from hpccm.toolchain import toolchain

class mpich(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig):
    """The `mpich` building block configures, builds, and installs the
    [MPICH](https://www.mpich.org) component.

    As a side effect, a toolchain is created containing the MPI
    compiler wrappers.  The tool can be passed to other operations
    that want to build using the MPI compiler wrappers.

    # Parameters

    annotate: Boolean flag to specify whether to include annotations
    (labels).  The default is False.

    check: Boolean flag to specify whether the `make check` and `make
    testing` steps should be performed.  The default is False.

    configure_opts: List of options to pass to `configure`.  The
github NVIDIA / hpc-container-maker / hpccm / building_blocks / julia.py View on Github external
import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.ldconfig
import hpccm.templates.rm
import hpccm.templates.tar
import hpccm.templates.wget

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.packages import packages
from hpccm.common import cpu_arch
from hpccm.primitives.comment import comment
from hpccm.primitives.environment import environment
from hpccm.primitives.shell import shell

class julia(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
            hpccm.templates.rm, hpccm.templates.tar, hpccm.templates.wget):
    """The `julia` building block downloads and installs the
    [Julia](https://julialang.org) programming environment.

    # Parameters

    cuda: Boolean flag to specify whether the JuliaGPU packages should
    be installed.  If True, the `CUDAapi`, `CUDAdrv`, `CUDAnative`,
    and `CuArrays` packages are installed. Note that the `CUDAdrv`
    package must be rebuilt when the container is running to align
    with the host CUDA driver. The default is False.

    depot: Path to the location of "user" Julia package depot. The
    default is an empty string, i.e., `~/.julia`. The depot location
    needs to be writable by the user running the container.
github NVIDIA / hpc-container-maker / hpccm / building_blocks / arm_allinea_studio.py View on Github external
import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.rm
import hpccm.templates.tar
import hpccm.templates.wget

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.packages import packages
from hpccm.common import cpu_arch, linux_distro
from hpccm.primitives.comment import comment
from hpccm.primitives.copy import copy
from hpccm.primitives.environment import environment
from hpccm.primitives.shell import shell
from hpccm.toolchain import toolchain

class arm_allinea_studio(bb_base, hpccm.templates.envvars, hpccm.templates.rm,
                         hpccm.templates.tar, hpccm.templates.wget):
    """The `arm_allinea_studio` building block downloads and installs the
    [Arm Allinea
    Studio](https://developer.arm.com/tools-and-software/server-and-hpc/arm-architecture-tools/arm-allinea-studio).

    You must agree to the [Arm End User License Agreement](https://developer.arm.com/tools-and-software/server-and-hpc/arm-architecture-tools/arm-allinea-studio/licensing/eula)
    to use this building block.

    As a side effect, a toolchain is created containing the Arm
    Allinea Studio compilers.  The toolchain can be passed to other
    operations that want to build using the Arm Allinea Studio
    compilers.  However, the environment is not automatically
    configured for the Arm Allinea Studio compilers.  The desired
    environment module must be manually loaded, e.g., `module load
    Generic-AArch64/RHEL/7/arm-linux-compiler/20.0`.
github NVIDIA / hpc-container-maker / hpccm / building_blocks / pmix.py View on Github external
from __future__ import unicode_literals
from __future__ import print_function

import posixpath

import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.ldconfig

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.generic_autotools import generic_autotools
from hpccm.building_blocks.packages import packages
from hpccm.common import linux_distro
from hpccm.primitives.comment import comment

class pmix(bb_base,hpccm.templates.envvars, hpccm.templates.ldconfig):
    """The `pmix` building block configures, builds, and installs the
    [PMIX](https://github.com/openpmix/openpmix) component.

    # Parameters

    annotate: Boolean flag to specify whether to include annotations
    (labels).  The default is False.

    check: Boolean flag to specify whether the `make check` step
    should be performed.  The default is False.

    configure_opts: List of options to pass to `configure`.  The
    default is an empty list.

    disable_FEATURE: Flags to control disabling features when
    configuring.  For instance, `disable_foo=True` maps to
github NVIDIA / hpc-container-maker / hpccm / building_blocks / mvapich2.py View on Github external
import re
from copy import copy as _copy

import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.ldconfig
import hpccm.templates.sed

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.generic_autotools import generic_autotools
from hpccm.building_blocks.packages import packages
from hpccm.common import linux_distro
from hpccm.primitives.comment import comment
from hpccm.toolchain import toolchain

class mvapich2(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
               hpccm.templates.sed):
    """The `mvapich2` building block configures, builds, and installs the
    [MVAPICH2](http://mvapich.cse.ohio-state.edu) component.
    Depending on the parameters, the source will be downloaded from
    the web (default) or copied from a source directory in the local
    build context.

    An InfiniBand building block ([OFED](#ofed) or [Mellanox
    OFED](#mlnx_ofed)) should be installed prior to this building
    block.

    As a side effect, a toolchain is created containing the MPI
    compiler wrappers.  The tool can be passed to other operations
    that want to build using the MPI compiler wrappers.

    # Parameters
github NVIDIA / hpc-container-maker / hpccm / building_blocks / mkl.py View on Github external
from __future__ import print_function

import logging # pylint: disable=unused-import

import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.wget

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.packages import packages
from hpccm.common import cpu_arch, linux_distro
from hpccm.primitives.comment import comment
from hpccm.primitives.environment import environment
from hpccm.primitives.shell import shell

class mkl(bb_base, hpccm.templates.envvars, hpccm.templates.wget):
    """The `mkl` building block downloads and installs the [Intel Math
    Kernel Library](http://software.intel.com/mkl).

    You must agree to the [Intel End User License Agreement](https://software.intel.com/en-us/articles/end-user-license-agreement)
    to use this building block.

    # Parameters

    environment: Boolean flag to specify whether the environment
    (`LD_LIBRARY_PATH`, `PATH`, and other variables) should be
    modified to include MKL. The default is True.

    eula: By setting this value to `True`, you agree to the [Intel End User License Agreement](https://software.intel.com/en-us/articles/end-user-license-agreement).
    The default value is `False`.

    mklvars: MKL provides an environment script (`mklvars.sh`) to
github NVIDIA / hpc-container-maker / hpccm / building_blocks / amgx.py View on Github external
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function

import posixpath

import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.ldconfig

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.generic_cmake import generic_cmake
from hpccm.building_blocks.packages import packages
from hpccm.primitives.comment import comment

class amgx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig):
    """The `amgx` building block downloads, configures, builds, and
    installs the [AMGX](https://developer.nvidia.com/amgx) component.

    The [CMake](#cmake) building block should be installed prior to
    this building block.

    Installing an MPI building block before this one is optional and
    will build the [AMGX](https://developer.nvidia.com/amgx) library
    with MPI support.  Some Eigensolvers make use of the MAGMA and/or
    MKL libraries and are only available if the paths to these
    libraries is specified as shown below in the cmake_opts.

    # Parameters

    annotate: Boolean flag to specify whether to include annotations (labels).
    The default is False.
github NVIDIA / hpc-container-maker / hpccm / building_blocks / boost.py View on Github external
import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.ldconfig
import hpccm.templates.rm
import hpccm.templates.tar
import hpccm.templates.wget

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.packages import packages
from hpccm.common import linux_distro
from hpccm.primitives.comment import comment
from hpccm.primitives.copy import copy
from hpccm.primitives.environment import environment
from hpccm.primitives.shell import shell

class boost(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
            hpccm.templates.rm, hpccm.templates.tar, hpccm.templates.wget):
    """The `boost` building block downloads and installs the
    [Boost](https://www.boost.org) component.

    # Parameters

    bootstrap_opts: List of options to pass to `bootstrap.sh`.  The
    default is an empty list.

    environment: Boolean flag to specify whether the environment
    (`LD_LIBRARY_PATH`) should be modified to include Boost. The
    default is True.

    ldconfig: Boolean flag to specify whether the Boost library
    directory should be added dynamic linker cache.  If False, then
    `LD_LIBRARY_PATH` is modified to include the Boost library
github NVIDIA / hpc-container-maker / hpccm / building_blocks / mvapich2_gdr.py View on Github external
import hpccm.config
import hpccm.templates.envvars
import hpccm.templates.ldconfig
import hpccm.templates.rm
import hpccm.templates.wget

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.packages import packages
from hpccm.common import linux_distro
from hpccm.primitives.comment import comment
from hpccm.primitives.copy import copy
from hpccm.primitives.environment import environment
from hpccm.primitives.shell import shell
from hpccm.toolchain import toolchain

class mvapich2_gdr(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
                   hpccm.templates.rm, hpccm.templates.wget):
    """The `mvapich2_gdr` building blocks installs the
    [MVAPICH2-GDR](http://mvapich.cse.ohio-state.edu) component.
    Depending on the parameters, the package will be downloaded from
    the web (default) or copied from the local build context.

    MVAPICH2-GDR is distributed as a binary package, so certain
    dependencies need to be met and only certain combinations of
    recipe components are supported; please refer to the MVAPICH2-GDR
    documentation for more information.

    The [GNU compiler](#gnu) or [PGI compiler](#pgi) building blocks
    should be installed prior to this building block.

    The [Mellanox OFED](#mlnx_ofed) building block should be installed
    prior to this building block.
github NVIDIA / hpc-container-maker / hpccm / building_blocks / intel_psxe.py View on Github external
import hpccm.templates.envvars
import hpccm.templates.rm
import hpccm.templates.sed
import hpccm.templates.tar

from hpccm.building_blocks.base import bb_base
from hpccm.building_blocks.intel_psxe_runtime import intel_psxe_runtime
from hpccm.building_blocks.packages import packages
from hpccm.common import cpu_arch, linux_distro
from hpccm.primitives.comment import comment
from hpccm.primitives.copy import copy
from hpccm.primitives.environment import environment
from hpccm.primitives.shell import shell
from hpccm.toolchain import toolchain

class intel_psxe(bb_base, hpccm.templates.envvars, hpccm.templates.rm,
                 hpccm.templates.sed, hpccm.templates.tar):
    """The `intel_psxe` building block installs [Intel Parallel Studio
    XE](https://software.intel.com/en-us/parallel-studio-xe).

    You must agree to the [Intel End User License Agreement](https://software.intel.com/en-us/articles/end-user-license-agreement)
    to use this building block.

    # Parameters

    components: List of Intel Parallel Studio XE components to
    install.  The default values is `DEFAULTS`.  If only the Intel C++
    and Fortran compilers are desired, then use `intel-icc__x86_64`
    and `intel-ifort__x86_64`.  Please note that the values are not
    consistent between versions; for a list of components, extract
    `pset/mediaconfig.xml` from the tarball and grep for `Abbr`.