Skip to content

Commit

Permalink
AB#549 Updated README and separeted out EasyConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chroxvi committed Mar 8, 2024
1 parent 841a5de commit b362b33
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 46 deletions.
60 changes: 14 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,34 @@

cotainr - a user space [Apptainer](https://apptainer.org/)/[Singularity](https://sylabs.io/singularity/) container builder.

cotainr makes it easy to build Singularity/Apptainer containers for certain use cases.
cotainr makes it easy to build Singularity/Apptainer containers for [certain use cases](https://cotainr.readthedocs.io/en/stable/user_guide/index.html#use-cases), e.g. building a container from a [Conda environment.yml file](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually) is as simple as:

```shell
$ cotainr build --base-image docker://ubuntu:22.04 --conda-env <YOUR_CONDA_ENV.yml>
```

## Licensing Information

cotainr is licensed under the European Union Public License (EUPL) 1.2. See the [LICENSE file](https://github.com/DeiC-HPC/cotainr/blob/main/LICENSE) for details.

Your use of cotainr is subject to the terms of the applicable component licenses as listed below. By using cotainr, you agree to fully comply with the terms of these component licenses. If you do not accept these license terms, do not use cotainr.

|Component|License|URL|Cotainr use|
|---------|-------|---|-----------|
|Miniforge|BSD 3-clause|[Miniforge License](https://github.com/conda-forge/miniforge/blob/main/LICENSE)|Miniforge is used to bootstrap conda environments when running `cotainr build --conda-env...`

## Documentation

Our documentation is hosted [here on Read the Docs](https://cotainr.readthedocs.io/en/latest/).
The [cotainr documentation is hosted on Read the Docs](https://cotainr.readthedocs.io/en/latest/).

## Installation

cotainr has no external dependencies other than Python >= 3.8 and Singularity/Apptainer.
This means that a release can be unpacked and run directly from the `bin/` directory.

### Easybuild
The recommended way to install cotainr is using pip:

If you are using easybuild, then here is an easyconfig, you can use:

```python
easyblock = 'Tarball'

name = 'cotainr'
version = '2023.11.0'
homepage = 'https://github.com/DeiC-HPC/container-builder'
description = 'cotainr is a tool that helps making Singularity/Apptainer containers.'
```bash
pip install cotainr
```

sources = [ {
'filename': '%(name)s-%(version)s.tar.gz',
'download_filename': '%(version)s.tar.gz',
'source_urls': ['https://github.com/DeiC-HPC/cotainr/archive/refs/tags'],
} ]
Alternatively, you may also simply download, unpack, and run cotainr directly from the `bin/` directory, which is possible since cotainr has no external dependencies other than Python and Singularity/Apptainer.

toolchain = SYSTEM
If you are using EasyBuild for managing your software stack, you may use the `cotainr_template.eb` EasyConfig as a starting point for installing cotainr via EasyBuild.

systems = """{
"lumi-g": {
"base-image": "docker://rocm/dev-ubuntu-22.04:5.5.1-complete"
},
"lumi-c": {
"base-image": "docker://ubuntu:22.04"
}
}"""
## Licensing Information

postinstallcmds = ['cd %(installdir)s/ ; cat >systems.json <<EOF\n' + systems + '\nEOF\n']
cotainr is licensed under the European Union Public License (EUPL) 1.2. See the [LICENSE file](https://github.com/DeiC-HPC/cotainr/blob/main/LICENSE) for details.

sanity_check_paths = {
'files': ['bin/cotainr'],
'dirs': ['cotainr'],
}
Your use of cotainr is subject to the terms of the applicable component licenses as listed below. By using cotainr, you agree to fully comply with the terms of these component licenses. If you do not accept these license terms, do not use cotainr.

sanity_check_commands = ['cotainr']
```
|Component|License|URL|Cotainr use|
|---------|-------|---|-----------|
|Miniforge|BSD 3-clause|[Miniforge License](https://github.com/conda-forge/miniforge/blob/main/LICENSE)|Miniforge is used to bootstrap conda environments when running `cotainr build --conda-env...`
40 changes: 40 additions & 0 deletions cotainr_template.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
easyblock = "Tarball"

name = "cotainr"
version = "2023.11.0"
homepage = "https://github.com/DeiC-HPC/container-builder"
description = "cotainr is a tool that makes it easy to build Singularity/Apptainer containers for certain HPC use cases."

sources = [
{
"filename": "%(name)s-%(version)s.tar.gz",
"download_filename": "%(version)s.tar.gz",
"source_urls": ["https://github.com/DeiC-HPC/cotainr/archive/refs/tags"],
}
]

docurls = ["https://cotainr.readthedocs.io/en/latest/"]

toolchain = SYSTEM

systems = """{
"lumi-g": {
"base-image": "docker://rocm/dev-ubuntu-22.04:5.5.1-complete"
},
"lumi-c": {
"base-image": "docker://ubuntu:22.04"
}
}"""

postinstallcmds = [
"cd %(installdir)s/ ; cat >systems.json <<EOF\n" + systems + "\nEOF\n"
]

sanity_check_paths = {
"files": ["bin/cotainr"],
"dirs": ["cotainr"],
}

sanity_check_commands = ["cotainr --help"]

moduleclass = "tools"

0 comments on commit b362b33

Please sign in to comment.