From 00e2f528be8c8f74569be32d51d0cb6f4347684b Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 19 Apr 2024 21:37:28 +0200 Subject: [PATCH] Address teo's comments + fix EB+Spack tutorial GH action --- .github/workflows/main.yml | 4 ++-- .../{tutorials.dockerfile => eb-spack-howto.dockerfile} | 2 +- docs/tutorial.rst | 4 +++- examples/tutorial/dockerfiles/eb-spack.dockerfile | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) rename ci-scripts/dockerfiles/{tutorials.dockerfile => eb-spack-howto.dockerfile} (80%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c764f37318..c7b4126aec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -86,7 +86,7 @@ jobs: run: | docker run reframe-${{ matrix.modules-version }}:latest - tutorialtest: + eb-spack-howto: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -99,7 +99,7 @@ jobs: - name: Build Image for Tutorial Tests run: | echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin - docker build -f ci-scripts/dockerfiles/tutorials.dockerfile -t reframe-tutorials:latest . + docker build -f ci-scripts/dockerfiles/eb-spack-howto.dockerfile -t reframe-tutorials:latest . docker logout - name: Run Tutorial Tests run: | diff --git a/ci-scripts/dockerfiles/tutorials.dockerfile b/ci-scripts/dockerfiles/eb-spack-howto.dockerfile similarity index 80% rename from ci-scripts/dockerfiles/tutorials.dockerfile rename to ci-scripts/dockerfiles/eb-spack-howto.dockerfile index 1bce7487a6..90e4aeb758 100644 --- a/ci-scripts/dockerfiles/tutorials.dockerfile +++ b/ci-scripts/dockerfiles/eb-spack-howto.dockerfile @@ -37,4 +37,4 @@ RUN echo '. /usr/local/lmod/lmod/init/profile && . /home/rfmuser/spack/share/spa ENV BASH_ENV /home/rfmuser/setup.sh -CMD ["/bin/bash", "-c", "./bin/reframe -r -C tutorials/config/lmodsys.py -R -c tutorials/build_systems"] +CMD ["/bin/bash", "-c", "./bin/reframe --system=tutorialsys -r -C examples/tutorial/config/baseline_modules.py -R -c examples/tutorial/easybuild/eb_test.py -c examples/tutorial/spack/spack_test.py"] diff --git a/docs/tutorial.rst b/docs/tutorial.rst index a629003901..fbd586b098 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -55,6 +55,8 @@ Once the Docker compose stack is up, you execute the following from a different docker exec -it $(docker ps -f name=frontend -q) /bin/bash + # Inside the container + cd reframe-examples/tutorial/ Once done, press Ctl-D in the frontend container and Ctl-C in the Docker compose console window. @@ -402,7 +404,7 @@ Let's try running the constrained version of our STREAM test with the configurat .. code-block:: bash :caption: Run in the single-node container. - reframe -C config/baseline.py -c stream/stream_build_run.py -r + reframe -C config/baseline.py -c stream/stream_runonly.py -r .. code-block:: console diff --git a/examples/tutorial/dockerfiles/eb-spack.dockerfile b/examples/tutorial/dockerfiles/eb-spack.dockerfile index ab18737286..645507a887 100644 --- a/examples/tutorial/dockerfiles/eb-spack.dockerfile +++ b/examples/tutorial/dockerfiles/eb-spack.dockerfile @@ -33,7 +33,7 @@ WORKDIR /home/user # Install Spack RUN mkdir .local && cd .local && \ - git clone --branch releases/v${_SPACK_VER} https://github.com/spack/spack + git clone --branch releases/v${_SPACK_VER} --depth 1 https://github.com/spack/spack RUN echo '. /usr/local/lmod/lmod/init/profile && . /home/user/.local/spack/share/spack/setup-env.sh' > /home/user/.profile ENV BASH_ENV /home/user/.profile