Skip to content

Commit

Permalink
add top level variable for lustre versoin
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevcich committed Feb 10, 2025
1 parent 3edca4f commit a328e7c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ FROM mpioperator/openmpi-builder:v$MPI_OPERATOR_VERSION AS builder

ARG OPENMPI_VERSION
ARG OPENMPI_MD5
ARG LUSTRE_VERSION
ENV OPENMPI_VERSION=$OPENMPI_VERSION
ENV OPENMPI_MD5=$OPENMPI_MD5
ENV LUSTRE_VERSION=$LUSTRE_VERSION

RUN apt-get update && apt-get install -y \
ca-certificates \
Expand All @@ -43,7 +45,7 @@ RUN apt-get update && apt-get install -y \

# Build lustre to include in mpifileutils
COPY build_lustre.sh /build_lustre.sh
RUN /build_lustre.sh
RUN /build_lustre.sh ${LUSTRE_VERSION}

# Create MPI File Utils dependencies directory
RUN mkdir -p /deps /mfu
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ IMAGE_TAG_BASE ?= ghcr.io/nearnodeflash/nnf-mfu
# tools. (i.e. podman)
CONTAINER_TOOL ?= docker

CRAY_LUSTRE_VERSION ?= cray-2.15.B19

RPM_PLATFORM ?= linux/amd64
docker-build: VERSION ?= $(shell cat .version)
docker-build: TARGET ?= production
docker-build: .version
${CONTAINER_TOOL} build --platform=$(RPM_PLATFORM) --target $(TARGET) -t $(IMAGE_TAG_BASE):$(VERSION) .
${CONTAINER_TOOL} build --platform=$(RPM_PLATFORM) --target $(TARGET) --build-arg LUSTRE_VERSION=${CRAY_LUSTRE_VERSION} -t $(IMAGE_TAG_BASE):$(VERSION) .

docker-build-debug: VERSION ?= $(shell cat .version)
docker-build-debug: TARGET ?= debug
docker-build-debug: IMAGE_TAG_BASE := $(IMAGE_TAG_BASE)-debug
docker-build-debug: .version
${CONTAINER_TOOL} build --platform=$(RPM_PLATFORM) --target $(TARGET) -t $(IMAGE_TAG_BASE):$(VERSION) .
${CONTAINER_TOOL} build --platform=$(RPM_PLATFORM) --target $(TARGET) --build-arg LUSTRE_VERSION=${CRAY_LUSTRE_VERSION} -t $(IMAGE_TAG_BASE):$(VERSION) .

docker-push: VERSION ?= $(shell cat .version)
docker-push: .version
Expand Down
9 changes: 7 additions & 2 deletions build_lustre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -ex

if [[ $1 == "" ]]; then
echo "Usage: $0 <Cray lustre tag e.g. cray-2.15.B19>"
exit 1
fi
CRAY_LUSTRE_VERSION=$1

# Determine kernel version and set variables
ls -l /usr/src/
KERNEL_FLAVOR=$(ls /lib/modules | head -1 | tr '-' '\n' | tail -1)
Expand All @@ -11,8 +17,7 @@ LINUX_DIR=$(ls -d -1 /usr/src/linux-headers-${KERNEL_BASE_VER}-${KERNEL_FLAVOR})

git clone --depth=1 https://github.com/Cray/lustre.git
cd lustre
# TODO configure lustre version at top level
git checkout cray-2.15.B19
git checkout $CRAY_LUSTRE_VERSION
sh autogen.sh
./configure --disable-server --enable-client --disable-tests --enable-mpitests=no \
--disable-gss-keyring --enable-gss=no \
Expand Down

0 comments on commit a328e7c

Please sign in to comment.