Accepting request 1062187 from home:eeich:branches:network:cluster
- Make sure the spack environment is set up correctly in spack-generated Dockerfiles (boo#1207784): Make-sure-spack-environment-is-set-up-in-Dockerfile-template.patch OBS-URL: https://build.opensuse.org/request/show/1062187 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=59
This commit is contained in:
parent
e664b92828
commit
3e4826eb29
@ -0,0 +1,40 @@
|
|||||||
|
From: Egbert Eich <eich@suse.com>
|
||||||
|
Date: Tue Jan 31 09:24:46 2023 +0100
|
||||||
|
Subject: Make sure spack environment is set up in Dockerfile template
|
||||||
|
Patch-mainline: Not yet
|
||||||
|
Git-commit: 865116877fe2536485326aa0fb53943160fa5e25
|
||||||
|
References:
|
||||||
|
|
||||||
|
The Dockerfile template did source the script
|
||||||
|
/opt/spack/share/spack/setup-env.sh
|
||||||
|
which lead to the binary 'spack' not being found and the
|
||||||
|
environment not being set up properly for `spack env activate .`.
|
||||||
|
|
||||||
|
Signed-off-by: Egbert Eich <eich@suse.com>
|
||||||
|
Signed-off-by: Egbert Eich <eich@suse.de>
|
||||||
|
---
|
||||||
|
share/spack/templates/container/Dockerfile | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
diff --git a/share/spack/templates/container/Dockerfile b/share/spack/templates/container/Dockerfile
|
||||||
|
index b10dcf08..dc9b91e5 100644
|
||||||
|
--- a/share/spack/templates/container/Dockerfile
|
||||||
|
+++ b/share/spack/templates/container/Dockerfile
|
||||||
|
@@ -19,7 +19,8 @@ RUN mkdir {{ paths.environment }} \
|
||||||
|
{{ manifest }} > {{ paths.environment }}/spack.yaml
|
||||||
|
|
||||||
|
# Install the software, remove unnecessary deps
|
||||||
|
-RUN cd {{ paths.environment }} && spack env activate . && spack install --fail-fast && spack gc -y
|
||||||
|
+RUN . /opt/spack/share/spack/setup-env.sh && \
|
||||||
|
+ cd {{ paths.environment }} && spack env activate . && spack install --fail-fast && spack gc -y
|
||||||
|
{% if strip %}
|
||||||
|
|
||||||
|
# Strip all the binaries
|
||||||
|
@@ -31,7 +32,7 @@ RUN find -L {{ paths.view }}/* -type f -exec readlink -f '{}' \; | \
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# Modifications to the environment that are necessary to run
|
||||||
|
-RUN cd {{ paths.environment }} && \
|
||||||
|
+RUN . /opt/spack/share/spack/setup-env.sh && cd {{ paths.environment }} && \
|
||||||
|
spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh
|
||||||
|
|
||||||
|
{% if extra_instructions.build %}
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 31 08:29:00 UTC 2023 - Egbert Eich <eich@suse.com>
|
||||||
|
|
||||||
|
- Make sure the spack environment is set up correctly in
|
||||||
|
spack-generated Dockerfiles (boo#1207784):
|
||||||
|
Make-sure-spack-environment-is-set-up-in-Dockerfile-template.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 11 13:04:37 UTC 2023 - Egbert Eich <eich@suse.com>
|
Wed Jan 11 13:04:37 UTC 2023 - Egbert Eich <eich@suse.com>
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ Patch6: Fix-error-during-documentation-build-due-to-recursive-module-inc
|
|||||||
Patch7: Fix-Spinx-configuration-to-avoid-throwing-errors.patch
|
Patch7: Fix-Spinx-configuration-to-avoid-throwing-errors.patch
|
||||||
Patch8: Set-modules-default-to-lmod.patch
|
Patch8: Set-modules-default-to-lmod.patch
|
||||||
Patch9: Add-support-for-container-building-using-a-SLE-base-container.patch
|
Patch9: Add-support-for-container-building-using-a-SLE-base-container.patch
|
||||||
|
Patch100: Make-sure-spack-environment-is-set-up-in-Dockerfile-template.patch
|
||||||
%if %{without doc}
|
%if %{without doc}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: lua-lmod
|
BuildRequires: lua-lmod
|
||||||
|
Loading…
Reference in New Issue
Block a user