From 33b9fc42eac1542d7ecfebfb155a99e3701c9993 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Thu, 7 Nov 2024 15:55:47 +0000 Subject: [PATCH 1/2] CI for float and CI for gpu --- .github/workflows/CIBuild.yml | 11 ++++++++- Docs/DockerFiles/Alma9/Dockerfile | 9 +++++--- Docs/DockerFiles/Rocky9/Dockerfile | 37 ++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100755 Docs/DockerFiles/Rocky9/Dockerfile diff --git a/.github/workflows/CIBuild.yml b/.github/workflows/CIBuild.yml index 2f1c0db..9454138 100755 --- a/.github/workflows/CIBuild.yml +++ b/.github/workflows/CIBuild.yml @@ -21,6 +21,15 @@ jobs: - os: Alma9 file: Docs/DockerFiles/Alma9/Dockerfile tag: alma9latest + cmakeoptions: -DUseDoubles=1 + - os: Alma9 float + file: Docs/DockerFiles/Alma9/Dockerfile + tag: alma9latest + cmakeoptions: -DUseDoubles=0 + - os: Rocky9 + file: Docs/DockerFiles/Rocky9/Dockerfile + tag: rocky9latest + cmakeoptions: -DUseGPU=1 name: Build CI ${{ matrix.os }} @@ -31,4 +40,4 @@ jobs: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build the Docker image - run: docker build . --file ${{ matrix.file }} --tag ghcr.io/${{ github.repository_owner }}/nuoscillator:${{ matrix.tag }} --build-arg NUOSCILLATOR_VERSION=${{ github.head_ref }} + run: docker build . --file ${{ matrix.file }} --tag ghcr.io/${{ github.repository_owner }}/nuoscillator:${{ matrix.tag }} --build-arg NUOSCILLATOR_VERSION=${{ github.head_ref }} --build-arg CMAKE_OPTIONS="${{ matrix.cmakeoptions }}" diff --git a/Docs/DockerFiles/Alma9/Dockerfile b/Docs/DockerFiles/Alma9/Dockerfile index ea8b5c1..9073218 100755 --- a/Docs/DockerFiles/Alma9/Dockerfile +++ b/Docs/DockerFiles/Alma9/Dockerfile @@ -1,6 +1,6 @@ #To run use: docker build -t nuoscillator . -# KS: Get glorious container from Luke which will work as a base -FROM picker24/root_v6_26_10:alma9 AS nuoscillator_build +# KS: Get glorious container from Kamil which will work as a base +FROM kamilskwarczynski/nukamil:latest AS nuoscillator_build # Add a label for the author LABEL website="https://dbarrow257.github.io/NuOscillator/" @@ -8,6 +8,9 @@ LABEL compiler="GNU 11.3.1" LABEL root_version="v6.26.10" LABEL org.opencontainers.image.description="Official NuOscillator container" +ARG CMAKE_OPTIONS +ENV CMAKE_OPTIONS=${CMAKE_OPTIONS:-DUseDoubles=1} + # Declare the build argument ARG NUOSCILLATOR_VERSION ENV NUOSCILLATOR_VERSION=${NUOSCILLATOR_VERSION:-develop} @@ -24,7 +27,7 @@ RUN git checkout ${NUOSCILLATOR_VERSION} RUN mkdir -p ${NuOscillator_INSTALL_DIR} WORKDIR ${NuOscillator_INSTALL_DIR} -RUN cmake -DUseGPU=0 -DUseMultithreading=1 -DUseDoubles=1 -DUseCUDAProb3=0 -DUseCUDAProb3Linear=1 -DUseProb3ppLinear=1 -DUseNuFASTLinear=1 -DUseProbGPULinear=0 ${NuOscillator_WORK_DIR} +RUN cmake -DUseGPU=0 -DUseMultithreading=1 ${CMAKE_OPTIONS} -DUseCUDAProb3=0 -DUseCUDAProb3Linear=1 -DUseProb3ppLinear=1 -DUseNuFASTLinear=1 -DUseProbGPULinear=0 ${NuOscillator_WORK_DIR} RUN make VERBOSE=1 && make install # KS: Need to set them here, otherwise container using this container will not be able to find NuOscillator diff --git a/Docs/DockerFiles/Rocky9/Dockerfile b/Docs/DockerFiles/Rocky9/Dockerfile new file mode 100755 index 0000000..2ccc726 --- /dev/null +++ b/Docs/DockerFiles/Rocky9/Dockerfile @@ -0,0 +1,37 @@ +#To run use: docker build -t nuoscillator . +# KS: Get glorious container from Luke which will work as a base +FROM picker24/root_v6_26_10:alma9 AS nuoscillator_build + +# Add a label for the author +LABEL website="https://dbarrow257.github.io/NuOscillator/" +LABEL org.opencontainers.image.description="Official NuOscillator container" + +ARG CMAKE_OPTIONS +ENV CMAKE_OPTIONS=${CMAKE_OPTIONS:-DUseGPU=1} + +# Declare the build argument +ARG NUOSCILLATOR_VERSION +ENV NUOSCILLATOR_VERSION=${NUOSCILLATOR_VERSION:-develop} +ENV NuOscillator_WORK_DIR=/opt/NuOscillator/ +ENV NuOscillator_INSTALL_DIR=/opt/NuOscillator/build/ + +RUN mkdir -p ${NuOscillator_WORK_DIR} + +WORKDIR /opt/ +# KS: Let's clone NuOscillator +RUN --mount=type=ssh git clone https://github.com/dbarrow257/NuOscillator ${NuOscillator_WORK_DIR} +WORKDIR ${NuOscillator_WORK_DIR} +RUN git checkout ${NUOSCILLATOR_VERSION} + +RUN mkdir -p ${NuOscillator_INSTALL_DIR} +WORKDIR ${NuOscillator_INSTALL_DIR} +RUN cmake -DUseGPU=1 -DUseMultithreading=1 -DUseDoubles=1 -DUseCUDAProb3=1 -DUseCUDAProb3Linear=0 -DUseProb3ppLinear=1 -DUseNuFASTLinear=1 -DUseProbGPULinear=1 ${NuOscillator_WORK_DIR} +RUN make VERBOSE=1 && make install + +# KS: Need to set them here, otherwise container using this container will not be able to find NuOscillator +ENV NuOscillator_ROOT=${NuOscillator_INSTALL_DIR} +ENV PATH=${NuOscillator_ROOT}/bin:${PATH} \ + LD_LIBRARY_PATH=${NuOscillator_ROOT}/lib:${LD_LIBRARY_PATH} + +# Start from NuOscillator install dir +WORKDIR ${NuOscillator_INSTALL_DIR} From c08299c68b8a6d6b46121f5dd069e1fade726111 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Thu, 7 Nov 2024 15:59:04 +0000 Subject: [PATCH 2/2] ups... --- Docs/DockerFiles/Alma9/Dockerfile | 4 ++-- Docs/DockerFiles/Rocky9/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Docs/DockerFiles/Alma9/Dockerfile b/Docs/DockerFiles/Alma9/Dockerfile index 9073218..00c6d19 100755 --- a/Docs/DockerFiles/Alma9/Dockerfile +++ b/Docs/DockerFiles/Alma9/Dockerfile @@ -1,6 +1,6 @@ #To run use: docker build -t nuoscillator . -# KS: Get glorious container from Kamil which will work as a base -FROM kamilskwarczynski/nukamil:latest AS nuoscillator_build +# KS: Get glorious container from Luke which will work as a base +FROM picker24/root_v6_26_10:alma9 AS nuoscillator_build # Add a label for the author LABEL website="https://dbarrow257.github.io/NuOscillator/" diff --git a/Docs/DockerFiles/Rocky9/Dockerfile b/Docs/DockerFiles/Rocky9/Dockerfile index 2ccc726..25166b6 100755 --- a/Docs/DockerFiles/Rocky9/Dockerfile +++ b/Docs/DockerFiles/Rocky9/Dockerfile @@ -1,6 +1,6 @@ #To run use: docker build -t nuoscillator . -# KS: Get glorious container from Luke which will work as a base -FROM picker24/root_v6_26_10:alma9 AS nuoscillator_build +# KS: Get glorious container from Kamil which will work as a base +FROM kamilskwarczynski/nukamil:latest AS nuoscillator_build # Add a label for the author LABEL website="https://dbarrow257.github.io/NuOscillator/"