cloudmesh-apptainer


Namecloudmesh-apptainer JSON
Version 5.0.3 PyPI version JSON
download
home_page
SummaryAn example cloudmesh command
upload_time2024-01-16 22:20:11
maintainer
docs_urlNone
author
requires_python>=3.8
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ Copyright 2017-2021 Gregor von Laszewski, Indiana University Copyright 2021,2022 Gregor von Laszewski, University of Virginia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords helper library cloudmesh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Cloudmesh Command apptainer

[![GitHub Repo](https://img.shields.io/badge/github-repo-green.svg)](https://github.com/cloudmesh/cloudmesh-apptainer)
[![image](https://img.shields.io/pypi/pyversions/cloudmesh-apptainer.svg)](https://pypi.org/project/cloudmesh-apptainer)
[![image](https://img.shields.io/pypi/v/cloudmesh-apptainer.svg)](https://pypi.org/project/cloudmesh-apptainer/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

[![General badge](https://img.shields.io/badge/Status-Production-<COLOR>.svg)](https://shields.io/)
[![GitHub issues](https://img.shields.io/github/issues/cloudmesh/cloudmesh-apptainer.svg)](https://github.com/cloudmesh/cloudmesh-apptainer/issues)
[![Contributors](https://img.shields.io/github/contributors/cloudmesh/cloudmesh-apptainer.svg)](https://github.com/cloudmesh/cloudmesh-apptainer/graphs/contributors)
[![General badge](https://img.shields.io/badge/Other-repos-<COLOR>.svg)](https://github.com/cloudmesh/cloudmesh)


[![Linux](https://img.shields.io/badge/OS-Linux-orange.svg)](https://www.linux.org/)
[![macOS](https://img.shields.io/badge/OS-macOS-lightgrey.svg)](https://www.apple.com/macos)
[![Windows](https://img.shields.io/badge/OS-Windows-blue.svg)](https://www.microsoft.com/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

<!-- START-MANUAL -->
```
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
```
<!-- STOP-MANUAL -->

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cloudmesh-apptainer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Gregor von Laszewski <laszewski@gmail.com>",
    "keywords": "helper library,cloudmesh",
    "author": "",
    "author_email": "Gregor von Laszewski <laszewski@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/5f/4e/0d4ff31dafee8a2f143f57d39984b7f9d1cd28e79c6adc34532eac16ce61/cloudmesh-apptainer-5.0.3.tar.gz",
    "platform": null,
    "description": "# Cloudmesh Command apptainer\n\n[![GitHub Repo](https://img.shields.io/badge/github-repo-green.svg)](https://github.com/cloudmesh/cloudmesh-apptainer)\n[![image](https://img.shields.io/pypi/pyversions/cloudmesh-apptainer.svg)](https://pypi.org/project/cloudmesh-apptainer)\n[![image](https://img.shields.io/pypi/v/cloudmesh-apptainer.svg)](https://pypi.org/project/cloudmesh-apptainer/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n[![General badge](https://img.shields.io/badge/Status-Production-<COLOR>.svg)](https://shields.io/)\n[![GitHub issues](https://img.shields.io/github/issues/cloudmesh/cloudmesh-apptainer.svg)](https://github.com/cloudmesh/cloudmesh-apptainer/issues)\n[![Contributors](https://img.shields.io/github/contributors/cloudmesh/cloudmesh-apptainer.svg)](https://github.com/cloudmesh/cloudmesh-apptainer/graphs/contributors)\n[![General badge](https://img.shields.io/badge/Other-repos-<COLOR>.svg)](https://github.com/cloudmesh/cloudmesh)\n\n\n[![Linux](https://img.shields.io/badge/OS-Linux-orange.svg)](https://www.linux.org/)\n[![macOS](https://img.shields.io/badge/OS-macOS-lightgrey.svg)](https://www.apple.com/macos)\n[![Windows](https://img.shields.io/badge/OS-Windows-blue.svg)](https://www.microsoft.com/windows)\n\n\n\nThe cloudmesh command apptainer command lets you more easily manage\napptainers for application-oriented work. The main contributions are:\n\n1. It includes a Python API so containers can be managed directly from\n   Python instead of a command line tool\n\n2. It includes a focussed command line tool with a selected number of\n   features to more easily start, stop, list, and execute commands in\n   a container. This includes the ability to rn shell scripts in the\n   container while specifying them on commandline.\n\n3. It includes a number of enhanced features to showcase the locations\n   and sizes of the images and instances.\n\n4. A simple YAML database is automatically created when using the API\n   or the command-line tool so that a record is preserved for\n   long-running containers. The record includes also a hostname,\n   making it possible to use this database to manage containers on\n   remote hosts.\n\nTo install it you can use \n\n    pip install cloudmesh-apptainer\n\nTo develop you will need the source code \n\n    git clone https://github.com/cloudmesh/cloudmesh-apptainer.git\n    git clone https://github.com/cloudmesh/cloudmesh-common.git\n\nNext, you can generate Python editable sources with\n\n    make pip\n\nand local wheels with\n\n    make local\n\nTo update the makefile you can say \n\n    make readme\n    \nFor more information see the Makefile\n\n## Manual Page\n\n<!-- START-MANUAL -->\n```\nCommand apptainer\n=================\n\n::\n\n    Usage:\n        apptainer download NAME URL\n        apptainer inspect NAME\n        apptainer list [--detail] [--output=OUTPUT]\n        apptainer info\n        apptainer --dir=DIRECTORY\n        apptainer --add=SIF\n        apptainer cache [--output=OUTPUT]\n        apptainer images [DIRECTORY] [--output=OUTPUT]\n        apptainer start NAME IMAGE [--home=PWD] [--gpu=GPU] [OPTIONS] [--dryrun]\n        apptainer stop NAME \n        apptainer shell NAME\n        apptainer exec NAME COMMAND \n        apptainer stats NAME [--output=OUTPUT]\n\n        This command can be used to manage apptainers.\n\n        Arguments:\n            FILE   a file name\n            PARAMETER  a parameterized parameter of the form \"a[0-3],a5\"\n            OPTIONS   Options passed to the start command\n            IMAGE     The name of the image to be used\n            NAME      The name of the apptainer\n            URL       The URL of the file to be downloaded\n\n        Options:\n            --dir=DIRECTORY    sets the the directory of the a list of aptainers\n            --add=SIF          adds a sif file to the list of apptainers\n            --image=IMAGE      sets the image to be used\n            --home=PWD         sets the home directory of the apptainer\n            --gpu=GPU          sets the GPU to be used\n            --command=COMMAND  sets the command to be executed\n            --output=OUTPUT    the format of the output [default: table]\n            --detail           shows more details [default: False]\n            -c COMMAND         sets the command to be executed\n\n    Description:\n\n        cms apptainer list\n            lists the apptainers in the specified directory \n            by default the directory is \n\n        cms apptainer --dir=DIRECTORY\n            sets the default apptainer directory in the cms variable\n            apptainer_dir\n\n        cms apptainer --add=SIF\n            adds a sif file to the list of apptainers\n\n        cms apptainer cache\n            lists the cached apptainers\n\n        cms apptainer info\n            prints information contained in the apptainer.yaml file.\n            An example is given next\n\n            cloudmesh:\n                apptainer:\n                    location:\n                    - ~/.cloudmesh/apptainer\n                    - ../rivanna/images\n                    apptainers:\n                    - name: cloudmesh-tfs.sif\n                        size: 1.5 GB\n                        path: ../rivanna/images\n                        location: ../rivanna/images/cloudmesh-tfs.sif\n                        hostname: udc-aj34-33\n                    - name: cloudmesh-tensorflow.sif\n                        size: 7.4 GB\n                        path: ../rivanna/images\n                        location: ../rivanna/images/cloudmesh-tensorflow.sif\n                        hostname: udc-aj34-33\n                    - name: haproxy_latest.sif\n                        size: 45.6 MB\n                        path: ../rivanna/images\n                        location: ../rivanna/images/haproxy_latest.sif\n                        hostname: udc-aj34-33\n                    instances:\n                    - instance: tfs\n                        pid: 337625\n                        img: /scratch/$USER/cm/5/rivanna/images/cloudmesh-tfs.sif\n                        ip: ''\n                        logErrPath: /home/$USER/.apptainer/instances/logs/udc-aj34-33/$USER/tfs.err\n                        logOutPath: /home/$USER/.apptainer/instances/logs/udc-aj34-33/$USER/tfs.out\n```\n<!-- STOP-MANUAL -->\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  Copyright 2017-2021 Gregor von Laszewski, Indiana University Copyright 2021,2022 Gregor von Laszewski, University of Virginia  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ",
    "summary": "An example cloudmesh command",
    "version": "5.0.3",
    "project_urls": {
        "Changelog": "https://github.com/cloudmesh/cloudmesh-apptainer/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/cloudmesh/cloudmesh-apptainer/blob/main/README.md",
        "Homepage": "https://github.com/cloudmesh/cloudmesh-apptainer",
        "Issues": "https://github.com/cloudmesh/cloudmesh-apptainer/issues",
        "Repository": "https://github.com/cloudmesh/cloudmesh-apptainer.git"
    },
    "split_keywords": [
        "helper library",
        "cloudmesh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db2c8f4093d12e292ba947822a1e6d587521c2bbdafa66d0667eff2b7f5fde67",
                "md5": "f295fdbd34503205032fcb22ea4d0dda",
                "sha256": "0d7991853a45c3ee36b266465ba7fe965a5d119f9f6f6cf57175052143efcb6b"
            },
            "downloads": -1,
            "filename": "cloudmesh_apptainer-5.0.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f295fdbd34503205032fcb22ea4d0dda",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 11229,
            "upload_time": "2024-01-16T22:20:09",
            "upload_time_iso_8601": "2024-01-16T22:20:09.287464Z",
            "url": "https://files.pythonhosted.org/packages/db/2c/8f4093d12e292ba947822a1e6d587521c2bbdafa66d0667eff2b7f5fde67/cloudmesh_apptainer-5.0.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f4e0d4ff31dafee8a2f143f57d39984b7f9d1cd28e79c6adc34532eac16ce61",
                "md5": "09e10da1e82e48edeb300ca3cb6ddff9",
                "sha256": "ff32fc8ecba74c72277965c9a9df4d9b593aef8624c5c4a8b38bb38010adbf66"
            },
            "downloads": -1,
            "filename": "cloudmesh-apptainer-5.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "09e10da1e82e48edeb300ca3cb6ddff9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15115,
            "upload_time": "2024-01-16T22:20:11",
            "upload_time_iso_8601": "2024-01-16T22:20:11.376618Z",
            "url": "https://files.pythonhosted.org/packages/5f/4e/0d4ff31dafee8a2f143f57d39984b7f9d1cd28e79c6adc34532eac16ce61/cloudmesh-apptainer-5.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-16 22:20:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudmesh",
    "github_project": "cloudmesh-apptainer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "cloudmesh-apptainer"
}
        
Elapsed time: 0.16432s