Skip to content
Snippets Groups Projects
Commit e0beff0d authored by adrianciu's avatar adrianciu
Browse files

esd-spack-installation: README

parent ccf28f62
No related branches found
No related tags found
1 merge request!4feat(spack_operation): implement setup_spack_env functionality
Pipeline #59495 canceled with stages
in 2 minutes and 13 seconds
.env 0 → 100644
BUILDCACHE_OCI_HOST=""
BUILDCACHE_OCI_PASSWORD=""
BUILDCACHE_OCI_PROJECT=""
BUILDCACHE_OCI_USERNAME=""
CONCRETIZE_OCI_HOST=""
CONCRETIZE_OCI_PASSWORD=""
CONCRETIZE_OCI_PROJECT=""
CONCRETIZE_OCI_USERNAME""
# ~~Yashchiki~~Koutakia # Dedal
For now, this repository provides helpers for the EBRAINS container image build flow. This repository provides functionalities to easily ```managed spack environments``` and ```helpers for the container image build flow```.
The lowest spack version which should be used with this library is v0.22.0 The lowest ```spack version``` compatible with this library is ```v0.23.0```.
This repository also provied CLI interface. For more informations, after installing this library, call dedal --help.
**Setting up the needed environment variables**
The ````<checkout path>\dedal\.env```` file contains the environment variables required for OCI registry used for caching.
Ensure that you edit the ````<checkout path>\dedal\.env```` file to match your environment.
The following provides an explanation of the various environment variables:
# OCI Registry Configuration Sample for concretization caches
# =============================
# The following variables configure the Harbor docker OCI registry (EBRAINS) used for caching.
# The hostname of the OCI registry. e.g. docker-registry.ebrains.eu
CONCRETIZE__OCI_HOST="docker-registry.ebrains.eu"
# The project name in the Docker registry.
CONCRETIZE__OCI_PROJECT="concretize_caches"
# The username used for authentication with the Docker registry.
CONCRETIZE__OCI_USERNAME="robot$concretize-cache-test+user"
# The password used for authentication with the Docker registry.
CONCRETIZE__OCI_HOST="###ACCESS_TOKEN###"
# OCI Registry Configuration Sample for binary caches
# =============================
# The following variables configure the Harbor docker OCI registry (EBRAINS) used for caching.
# The hostname of the OCI registry. e.g. docker-registry.ebrains.eu
BUILDCACHE_OCI_HOST="docker-registry.ebrains.eu"
# The project name in the Docker registry.
BUILDCACHE_OCI_PROJECT="binary-cache-test"
# The username used for authentication with the Docker registry.
BUILDCACHE_OCI_USERNAME="robot$binary-cache-test+user"
# The password used for authentication with the Docker registry.
BUILDCACHE_OCI_HOST="###ACCESS_TOKEN###"
For both concretization and binary caches, the cache version can be changed via the attributes ```cache_version_concretize``` and ```cache_version_build```.
The default values are ```v1```.
...@@ -10,8 +10,8 @@ class SpackOperationUseCache(SpackOperation): ...@@ -10,8 +10,8 @@ class SpackOperationUseCache(SpackOperation):
This class uses caching for the concretization step and for the installation step. This class uses caching for the concretization step and for the installation step.
""" """
def __init__(self, spack_config: SpackConfig = SpackConfig(), cache_version_concretize='cache', def __init__(self, spack_config: SpackConfig = SpackConfig(), cache_version_concretize='v1',
cache_version_build='cache'): cache_version_build='v1'):
super().__init__(spack_config, logger=get_logger(__name__)) super().__init__(spack_config, logger=get_logger(__name__))
self.cache_dependency = BuildCacheManager(os.environ.get('CONCRETIZE_OCI_HOST'), self.cache_dependency = BuildCacheManager(os.environ.get('CONCRETIZE_OCI_HOST'),
os.environ.get('CONCRETIZE_OCI_PROJECT'), os.environ.get('CONCRETIZE_OCI_PROJECT'),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment