Skip to content

Commit

Permalink
Use lsb_release to get ubuntu version
Browse files Browse the repository at this point in the history
  • Loading branch information
alephpiece committed Apr 6, 2024
1 parent bf4ecc3 commit 1007be4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ compilers:
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
flags: {}
operating_system: ubuntu22.04
target: x86_64
operating_system: UBUNTU_VERSION
target: $TARGET
modules: []
environment: {}
extra_rpaths: []
Expand All @@ -123,8 +123,10 @@ EOF
# find gcc and external packages
RUN <<EOF bash
set -ex
# substitute clang version with the correct one
# substitute clang version and ubuntu version with the correct ones
sed -i -e "s/CLANG_VERSION/$(clang --version | grep -Po '(?<=version )[^ ]+')/g" $CONFIG_DIR/compilers.yaml
sed -i -e "s/UBUNTU_VERSION/ubuntu$(lsb_release -r | awk '{print $2}')/g" $CONFIG_DIR/compilers.yaml

# find gcc
spack compiler find --scope system
spack compiler list
Expand Down

0 comments on commit 1007be4

Please sign in to comment.