Skip to content

Improvements to production docker images: arm compatibility; run integration tests #1420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Mar 14, 2025

Conversation

GernotMaier
Copy link
Contributor

@GernotMaier GernotMaier commented Mar 6, 2025

Two improvements regarding the production images:

  • remove avx2 flag for non-optimized images to allow to run them on arm-based CPUs (still need to use podman run --arch amd64 ... to execute)
  • add integration test to run on the production images with non-optimized CORSIKA; this was noted recently that we need to test these images.

Note that this is in some sense a duplication of what has been / will be added in the SimPipe gitlab repository. However, for it is easier to develop these steps here.

Minor changes:

  • docker image tags are call small caps. Changed there the name for non-optimized images from noOpt to no-opt.
  • increased the allowed line length in yaml files in the pre-commit section to 300 characters (from 250). Reason is that I simple cannot get the CI running without having the image file in one single line.

@GernotMaier GernotMaier self-assigned this Mar 6, 2025

This comment has been minimized.

1 similar comment

This comment has been minimized.

@GernotMaier GernotMaier marked this pull request as ready for review March 6, 2025 12:15
Copy link
Contributor

@orelgueta orelgueta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor comments.

- {build_opt: 'prod6-baseline', extra_def: ''}
avx_instruction: ['no_opt']
container:
image: ghcr.io/gammasim/simtools-prod-opt-${{ matrix.version.simtel_version }}-corsika-${{ matrix.version.corsika_version }}-bernlohr-${{ matrix.version.bernlohr_version }}-${{ matrix.production.build_opt }}-${{ matrix.hadronic_model }}-${{ matrix.avx_instruction }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the opt in prod-opt here?

Reading further, I understand it comes from Docker image name. Are they still separate and the opt is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the opt. Good point.


- name: Set sim_telarray path
run: |
echo "PATH=\$PATH:/usr/bin:/usr/local/bin:$SIMTOOLS_SIMTEL_PATH" >> "$GITHUB_ENV"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need to explicitly set /usr/bin:/usr/local/bin? There's no harm in it of course, but if it's not needed I would remove it (who knows, maybe in a future OS it will change).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, needed - running the workflow without it will give you:

OCI runtime exec failed: exec failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown

COPY --from=build_image /workdir/sim_telarray/ /workdir/sim_telarray/

RUN microdnf update -y && microdnf install -y \
bc findutils gcc-c++ git gsl-devel gcc-fortran libgfortran \
procps python3.11-pip zstd && \
procps python3.12-devel zstd && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the python version be an argument that updates when we updated the supported versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, added.

This comment has been minimized.

@GernotMaier GernotMaier changed the title Imrovements to production docker images: arm compatibility; run integration tests Improvements to production docker images: arm compatibility; run integration tests Mar 6, 2025

This comment has been minimized.

This comment has been minimized.

@GernotMaier
Copy link
Contributor Author

Thanks @orelgueta for the review. I tried to address them, let me know if there is anything else.

This comment has been minimized.

Copy link

Passed

Analysis Details

0 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage No coverage information (94.30% Estimated after merge)
  • Duplications No duplication information (0.00% Estimated after merge)

Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w

View in SonarQube

Copy link
Contributor

@orelgueta orelgueta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay, all good now!

@GernotMaier
Copy link
Contributor Author

Thanks a lot @orelgueta - and no worries, no other PR depends directly on this work.

@GernotMaier GernotMaier merged commit 58f4ab2 into main Mar 14, 2025
13 checks passed
@GernotMaier GernotMaier deleted the arm-compatible-docker-images branch March 14, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing for newests/different simtel_arrray and corsika versions
2 participants