Skip to content

Commit 83440cd

Browse files
committed
fix: decouple OLCF_AFAR_ROOT from AFAR_VERSION ARG in Dockerfile
ENV OLCF_AFAR_ROOT=/opt/${AFAR_VERSION} expanded to /opt/ in cpu/gpu images because those builds supply no AFAR_VERSION. Introduce a dedicated OLCF_AFAR_ROOT build-arg (default "") so cpu/gpu images get an empty var and only the AMD build passes the real path.
1 parent 1557fc4 commit 83440cd

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ARG FC_COMPILER
88
ARG COMPILER_PATH
99
ARG COMPILER_LD_LIBRARY_PATH
1010
ARG AFAR_VERSION
11+
ARG OLCF_AFAR_ROOT=""
1112

1213
ENV DEBIAN_FRONTEND=noninteractive
1314
ENV TZ=UTC
@@ -78,7 +79,7 @@ COPY ../ /opt/MFC
7879
ENV CC=${CC_COMPILER}
7980
ENV CXX=${CXX_COMPILER}
8081
ENV FC=${FC_COMPILER}
81-
ENV OLCF_AFAR_ROOT=/opt/${AFAR_VERSION}
82+
ENV OLCF_AFAR_ROOT=${OLCF_AFAR_ROOT}
8283
ENV PATH="${COMPILER_PATH}:/opt/mpich/bin:$PATH"
8384
ENV LD_LIBRARY_PATH="${COMPILER_LD_LIBRARY_PATH}:/opt/mpich/lib:${LD_LIBRARY_PATH:-}"
8485

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ jobs:
124124
BASE_IMAGE=${{ matrix.config.base_image }}
125125
TARGET=amd
126126
AFAR_VERSION=rocm-afar-8873-drop-22.2.0
127+
OLCF_AFAR_ROOT=/opt/rocm-afar-8873-drop-22.2.0
127128
CC_COMPILER=gcc
128129
CXX_COMPILER=g++
129130
FC_COMPILER=/opt/rocm-afar-8873-drop-22.2.0/bin/amdflang

0 commit comments

Comments
 (0)