Skip to main content

An example cloudmesh command

Project description

Cloudmesh Command apptainer

GitHub Repo image image License

General badge GitHub issues Contributors General badge

Linux macOS Windows

The cloudmesh command apptainer command lets you more easily manage apptainers for application-oriented work. The main contributions are:

  1. It includes a Python API so containers can be managed directly from Python instead of a command line tool

  2. It includes a focussed command line tool with a selected number of features to more easily start, stop, list, and execute commands in a container. This includes the ability to rn shell scripts in the container while specifying them on commandline.

  3. It includes a number of enhanced features to showcase the locations and sizes of the images and instances.

  4. A simple YAML database is automatically created when using the API or the command-line tool so that a record is preserved for long-running containers. The record includes also a hostname, making it possible to use this database to manage containers on remote hosts.

To install it you can use

pip install cloudmesh-apptainer

To develop you will need the source code

git clone https://github.com/cloudmesh/cloudmesh-apptainer.git
git clone https://github.com/cloudmesh/cloudmesh-common.git

Next, you can generate Python editable sources with

make pip

and local wheels with

make local

To update the makefile you can say

make readme

For more information see the Makefile

Manual Page

Command apptainer
=================

::

    Usage:
        apptainer download NAME URL
        apptainer inspect NAME
        apptainer list [--detail] [--output=OUTPUT]
        apptainer info
        apptainer --dir=DIRECTORY
        apptainer --add=SIF
        apptainer cache [--output=OUTPUT]
        apptainer images [DIRECTORY] [--output=OUTPUT]
        apptainer start NAME IMAGE [--home=PWD] [--gpu=GPU] [OPTIONS] [--dryrun]
        apptainer stop NAME 
        apptainer shell NAME
        apptainer exec NAME COMMAND 
        apptainer stats NAME [--output=OUTPUT]

        This command can be used to manage apptainers.

        Arguments:
            FILE   a file name
            PARAMETER  a parameterized parameter of the form "a[0-3],a5"
            OPTIONS   Options passed to the start command
            IMAGE     The name of the image to be used
            NAME      The name of the apptainer
            URL       The URL of the file to be downloaded

        Options:
            --dir=DIRECTORY    sets the the directory of the a list of aptainers
            --add=SIF          adds a sif file to the list of apptainers
            --image=IMAGE      sets the image to be used
            --home=PWD         sets the home directory of the apptainer
            --gpu=GPU          sets the GPU to be used
            --command=COMMAND  sets the command to be executed
            --output=OUTPUT    the format of the output [default: table]
            --detail           shows more details [default: False]
            -c COMMAND         sets the command to be executed

    Description:

        cms apptainer list
            lists the apptainers in the specified directory 
            by default the directory is 

        cms apptainer --dir=DIRECTORY
            sets the default apptainer directory in the cms variable
            apptainer_dir

        cms apptainer --add=SIF
            adds a sif file to the list of apptainers

        cms apptainer cache
            lists the cached apptainers

        cms apptainer info
            prints information contained in the apptainer.yaml file.
            An example is given next

            cloudmesh:
                apptainer:
                    location:
                    - ~/.cloudmesh/apptainer
                    - ../rivanna/images
                    apptainers:
                    - name: cloudmesh-tfs.sif
                        size: 1.5 GB
                        path: ../rivanna/images
                        location: ../rivanna/images/cloudmesh-tfs.sif
                        hostname: udc-aj34-33
                    - name: cloudmesh-tensorflow.sif
                        size: 7.4 GB
                        path: ../rivanna/images
                        location: ../rivanna/images/cloudmesh-tensorflow.sif
                        hostname: udc-aj34-33
                    - name: haproxy_latest.sif
                        size: 45.6 MB
                        path: ../rivanna/images
                        location: ../rivanna/images/haproxy_latest.sif
                        hostname: udc-aj34-33
                    instances:
                    - instance: tfs
                        pid: 337625
                        img: /scratch/$USER/cm/5/rivanna/images/cloudmesh-tfs.sif
                        ip: ''
                        logErrPath: /home/$USER/.apptainer/instances/logs/udc-aj34-33/$USER/tfs.err
                        logOutPath: /home/$USER/.apptainer/instances/logs/udc-aj34-33/$USER/tfs.out

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudmesh-apptainer-5.0.3.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

cloudmesh_apptainer-5.0.3-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cloudmesh-apptainer-5.0.3.tar.gz.

File metadata

  • Download URL: cloudmesh-apptainer-5.0.3.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for cloudmesh-apptainer-5.0.3.tar.gz
Algorithm Hash digest
SHA256 ff32fc8ecba74c72277965c9a9df4d9b593aef8624c5c4a8b38bb38010adbf66
MD5 09e10da1e82e48edeb300ca3cb6ddff9
BLAKE2b-256 5f4e0d4ff31dafee8a2f143f57d39984b7f9d1cd28e79c6adc34532eac16ce61

See more details on using hashes here.

File details

Details for the file cloudmesh_apptainer-5.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cloudmesh_apptainer-5.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0d7991853a45c3ee36b266465ba7fe965a5d119f9f6f6cf57175052143efcb6b
MD5 f295fdbd34503205032fcb22ea4d0dda
BLAKE2b-256 db2c8f4093d12e292ba947822a1e6d587521c2bbdafa66d0667eff2b7f5fde67

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page