Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
easybuild-repository-public-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DEEP-SEA
easybuild-repository-public-release
Commits
f23764ed
Commit
f23764ed
authored
4 years ago
by
Damian Alvarez
Browse files
Options
Downloads
Patches
Plain Diff
Let's do the check at parsing time, and fix a couple of format issues and oopsies
parent
a294da12
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Custom_Hooks/eb_hooks.py
+17
-19
17 additions, 19 deletions
Custom_Hooks/eb_hooks.py
with
17 additions
and
19 deletions
Custom_Hooks/eb_hooks.py
+
17
−
19
View file @
f23764ed
...
@@ -46,7 +46,7 @@ VETOED_INSTALLATIONS = {
...
@@ -46,7 +46,7 @@ VETOED_INSTALLATIONS = {
'
juwelsbooster
'
:
[
'
impi
'
],
'
juwelsbooster
'
:
[
'
impi
'
],
'
juwels
'
:
[],
'
juwels
'
:
[],
'
jurecadc
'
:
[],
'
jurecadc
'
:
[],
'
jurecabooster
'
:
[
'
OpenMPI
'
,
'
CUDA
'
,
'
nvidia-driver
'
,
'
UCX
'
,
'
NVHPC
'
]
'
jurecabooster
'
:
[
'
OpenMPI
'
,
'
CUDA
'
,
'
nvidia-driver
'
,
'
UCX
'
,
'
NVHPC
'
]
,
'
jusuf
'
:
[
'
impi
'
],
'
jusuf
'
:
[
'
impi
'
],
'
hdfml
'
:
[],
'
hdfml
'
:
[],
}
}
...
@@ -64,10 +64,26 @@ REQUIRE_MODALTSOFTNAME = {
...
@@ -64,10 +64,26 @@ REQUIRE_MODALTSOFTNAME = {
"
intel-compilers
"
:
"
Intel
"
,
"
intel-compilers
"
:
"
Intel
"
,
}
}
def
installation_vetoer
(
ec
):
"
Check whether this package is NOT supposed to be installed in this system, and abort if necessary
"
name
=
ec
[
'
name
'
]
system_name
=
os
.
getenv
(
'
LMOD_SYSTEM_NAME
'
)
if
name
in
VETOED_INSTALLATIONS
[
system_name
]:
print_warning
(
"
\n
You are attempting to install software that should not be installed in this system.
\n
"
"
Please double check the list of packages that you are attempting to install. The following
\n
"
f
"
packages can
'
t be installed in
{
system_name
}
:
\n
"
)
for
package
in
VETOED_INSTALLATIONS
[
system_name
]:
print
(
f
"
-
{
package
}
"
)
exit
(
1
)
def
parse_hook
(
ec
,
*
args
,
**
kwargs
):
def
parse_hook
(
ec
,
*
args
,
**
kwargs
):
"""
Custom parse hook to manage installations intended for JSC systems.
"""
"""
Custom parse hook to manage installations intended for JSC systems.
"""
# First of all check if this should be installed
installation_vetoer
(
ec
)
ec_dict
=
ec
.
asdict
()
ec_dict
=
ec
.
asdict
()
# Compilers are are a family (in the Lmod sense)
# Compilers are are a family (in the Lmod sense)
if
ec
.
name
in
SUPPORTED_COMPILERS
:
if
ec
.
name
in
SUPPORTED_COMPILERS
:
...
@@ -193,28 +209,10 @@ family("mpi")
...
@@ -193,28 +209,10 @@ family("mpi")
"
eb --robot=$EASYBUILD_ROBOT:$EBROOTEASYBUILD/easybuild/easyconfigs --try-update-deps ....
"
"
eb --robot=$EASYBUILD_ROBOT:$EBROOTEASYBUILD/easybuild/easyconfigs --try-update-deps ....
"
)
)
def
installation_vetoer
(
self
):
"
Check whether this package is NOT supposed to be installed in this system, and abort if necessary
"
ec
=
self
.
cfg
name
=
ec
[
'
name
'
]
system_name
=
os
.
getenv
(
'
SYSTEMNAME
'
)
if
name
in
VETOED_INSTALLATIONS
[
system_name
]:
print_warning
(
"
\n
You are attempting to install software that should not be installed in this system.
\n
"
"
\n
Please double check the list of packages that you are attempting to install. The following
\n
"
f
"
\n
packages can
'
t be installed in
{
system_name
}
:
\n
"
)
for
package
in
VETOED_INSTALLATIONS
[
system_name
]:
print_warning
(
f
"
-
{
package
}
\n
"
)
exit
(
1
)
def
pre_ready_hook
(
self
,
*
args
,
**
kwargs
):
def
pre_ready_hook
(
self
,
*
args
,
**
kwargs
):
"
When we are building something, do some checks for bad behaviour
"
"
When we are building something, do some checks for bad behaviour
"
ec
=
self
.
cfg
ec
=
self
.
cfg
# First of all check if this should be installed
installation_vetoer
(
ec
)
# Grab name, path, toolchain, install path and check if we are installing
# Grab name, path, toolchain, install path and check if we are installing
# GCCcore/MPI
# GCCcore/MPI
name
=
ec
[
"
name
"
]
name
=
ec
[
"
name
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment