Newer
Older

This repository provides functionalities to easily ```managed spack environments``` and
```helpers for the container image build flow```.
**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:
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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```.
Before using this library, the following tool must be installed on Linux distribution:
````
apt install -y bzip2 ca-certificates g++ gcc gfortran git gzip lsb-release patch python3 python3-pip tar unzip xz-utils zstd
````
````
python3 -m pip install --upgrade pip setuptools wheel
````
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Dedal library installation
```sh
pip install dedal
```
# Dedal CLI Commands
The following commands are available in this CLI tool. You can view detailed explanations by using the `--help` option
with any command.
### 1. `dedal install-spack`
Install spack in the install_dir folder.
**Options:**
- `--spack_version <TEXT>` : Specifies the Spack version to be installed (default: v0.23.0).
- `--bashrc_path <TEXT>` : Defines the path to .bashrc.
### 2. `dedal set-config`
Sets configuration parameters for the session.
**Options:**
- `--use_cache` Enables cashing
- `--use_spack_global` Uses spack installed globally on the os
- `--env_name <TEXT>` Environment name
- `--env_path <TEXT>` Environment path to download locally
- `--env_git_path <TEXT>` Git path to download the environment
- `--install_dir <TEXT>` Install directory for installing spack;
spack environments and repositories are
stored here
- `--upstream_instance <TEXT>` Upstream instance for spack environment
- `--system_name <TEXT>` System name; it is used inside the spack
environment
- `--concretization_dir <TEXT>` Directory where the concretization caching
(spack.lock) will be downloaded
- `--buildcache_dir <TEXT>` Directory where the binary caching is
downloaded for the spack packages
- `--gpg_name <TEXT>` Gpg name
- `--gpg_mail <TEXT>` Gpg mail contact address
- `--cache_version_concretize <TEXT>`
Cache version for concretizaion data
- `--cache_version_build <TEXT>` Cache version for binary caches data
Adrian Ciu
committed
- `--view <SpackViewEnum>` Spack environment view
- `--update_cache <bool>` Flag for overriding existing cache
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
### 3. `dedal show-config`
Show the current configuration.
### 4. `dedal clear-config`
Clears stored configuration
### 5. `dedal add-spack-repo`
Adds a spack repository to the spack environments.
**Options:**
- `--repo_name <TEXT>` Repository name [required]
- `--path <TEXT>` Repository path to download locally [required]
- `--git_path <TEXT>` Git path to download the repository [required]
### 6. `dedal setup-spack-env`
Setups a spack environment according to the given configuration.
### 7. `dedal concretize`
Spack concretization step.
### 9. `dedal install-packages`
Installs spack packages present in the spack environment defined in configuration.
**Options:**
- `--jobs <INTEGER>` Number of parallel jobs for spack installation
# Dedal's UML diagram
