Skip to content

Commit

Permalink
Merge branch 'develop' into uniform_error_calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomDefaultUser authored Jul 26, 2024
2 parents 049d51d + 0fed9cc commit 44fd34a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/cpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: '1'

- name: Set environment variables
run: |
Expand Down Expand Up @@ -62,7 +64,7 @@ jobs:
fi
- name: Pull latest image from container registry
run: docker pull $IMAGE_REPO/$IMAGE_NAME || true
run: docker pull $IMAGE_REPO/$IMAGE_NAME --quiet || true

- name: Build temporary Docker image
run: |
Expand Down Expand Up @@ -131,12 +133,12 @@ jobs:

- name: "Prepare environment: Load Docker image from cache"
if: env.DOCKER_TAG != 'latest'
run: docker load -i $DOCKER_CACHE_PATH/docker-image.tar.gz
run: docker load -i $DOCKER_CACHE_PATH/docker-image.tar.gz --quiet

- name: "Prepare environment: Pull latest image from container registry"
if: env.DOCKER_TAG == 'latest'
run: |
docker pull $IMAGE_REPO/$IMAGE_NAME:latest
docker pull $IMAGE_REPO/$IMAGE_NAME:latest --quiet
docker image tag $IMAGE_REPO/$IMAGE_NAME:latest $IMAGE_NAME:latest
- name: "Prepare environment: Run Docker container"
Expand All @@ -155,6 +157,8 @@ jobs:
- name: Check out repository (mala)
uses: actions/checkout@v4
with:
fetch-depth: '1'

- name: Install mala package
# Exec all commands inside the mala-cpu container
Expand All @@ -174,7 +178,13 @@ jobs:
# if comparison fails, `install/mala_cpu_[base]_environment.yml` needs to be aligned with
# `requirements.txt` and/or extra dependencies are missing in the Docker Conda environment
diff --side-by-side --color=always env_before.yml env_after.yml
if diff --brief env_before.yml env_after.yml
then
echo "Files env_before.yml and env_after.yml do not differ."
else
diff --side-by-side --color-always env_before.yml env_after.yml
fi
- name: Download test data repository from RODARE
shell: 'bash -c "docker exec -i mala-cpu python < {0}"'
Expand Down Expand Up @@ -229,9 +239,6 @@ jobs:
((contains(github.ref_name, 'develop') || contains(github.ref_name, 'master')) && needs.build-docker-image-cpu.outputs.docker-tag != 'latest')
|| startsWith(github.ref, 'refs/tags/')
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: "Prepare environment: Restore cache"
if: env.DOCKER_TAG != 'latest'
uses: actions/cache@v4
Expand All @@ -242,21 +249,19 @@ jobs:

- name: "Prepare environment: Load Docker image from cache"
if: env.DOCKER_TAG != 'latest'
run: docker load -i $DOCKER_CACHE_PATH/docker-image.tar.gz
run: docker load -i $DOCKER_CACHE_PATH/docker-image.tar.gz --quiet

- name: "Prepare environment: Pull latest image from container registry"
if: env.DOCKER_TAG == 'latest'
run: docker pull $IMAGE_REPO/$IMAGE_NAME:latest
run: docker pull $IMAGE_REPO/$IMAGE_NAME:latest --quiet

- name: Tag Docker image
run: |
# Execute on change of Docker image
if [[ "$DOCKER_TAG" != 'latest' ]]; then
GIT_SHA=${GITHUB_REF_NAME}-$(git rev-parse --short "$GITHUB_SHA")
echo "GIT_SHA=$GIT_SHA"
docker tag $IMAGE_NAME:$GITHUB_RUN_ID $IMAGE_REPO/$IMAGE_NAME:latest
docker tag $IMAGE_NAME:$GITHUB_RUN_ID $IMAGE_REPO/$IMAGE_NAME:$GIT_SHA
docker tag $IMAGE_NAME:$GITHUB_RUN_ID $IMAGE_REPO/$IMAGE_NAME:${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}
fi
# Execute on push of git tag
Expand All @@ -272,4 +277,4 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push Docker image
run: docker push $IMAGE_REPO/$IMAGE_NAME --all-tags
run: docker push $IMAGE_REPO/$IMAGE_NAME --all-tags | grep -v -E 'Waiting|Layer already|Preparing|Pushed'
2 changes: 1 addition & 1 deletion docs/source/install/installing_lammps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The MALA team recommends to build LAMMPS with ``cmake``. To do so
shipped with the LAMMPS code, should be at ``/your/path/to/lammps/lib/kokkos/bin/nvcc_wrapper``

For example, this configures the LAMMPS cmake build with Kokkos support
for an Intel Haswell CPU and an Nvidia Volta GPU, with MPI support:
for an Intel Haswell CPU and an Nvidia Volta GPU, with MPI support:

.. code-block:: bash
Expand Down

0 comments on commit 44fd34a

Please sign in to comment.