diff --git a/.github/workflows/CDImage.yml b/.github/workflows/CDImage.yml index 0bbe2034c..215ce5a2a 100644 --- a/.github/workflows/CDImage.yml +++ b/.github/workflows/CDImage.yml @@ -1,3 +1,4 @@ +--- # Update MaCh3 container image registry with newest updates name: Image CD @@ -24,6 +25,10 @@ jobs: file: Doc/MaCh3DockerFiles/Alma9/Dockerfile tag_latest: alma9latest installoptions: -j4 + - os: rocky9cuda + file: Doc/MaCh3DockerFiles/Rocky9/Dockerfile + tag_latest: rocky9cudalatest + installoptions: -j4 # - os: ubuntu22.04 # file: Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile # tag_latest: ubuntu22.04latest @@ -36,40 +41,40 @@ jobs: name: Image CD ${{ matrix.os }} steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Log in to GitHub Container Registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Log in to GitHub Container Registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - name: Build Docker image - run: | - if [ "${{ github.ref_type }}" == 'tag' ]; then - docker build . \ - --file ${{ matrix.file }} \ - --tag ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.os }}${{ github.ref_name }} \ - --build-arg MACH3_VERSION=${{ github.ref_name }} \ - --build-arg INSTALL_OPTIONS="${{ matrix.installoptions }}" - else - docker build . \ - --file ${{ matrix.file }} \ - --tag ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.tag_latest }} \ - --build-arg MACH3_VERSION=develop \ - --build-arg INSTALL_OPTIONS="${{ matrix.installoptions }}" - fi + - name: Build Docker image + run: | + if [ "${{ github.ref_type }}" == "tag" ]; then + docker build . \ + --file "${{ matrix.file }}" \ + --tag "ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.os }}${{ github.ref_name }}" \ + --build-arg MACH3_VERSION="${{ github.ref_name }}" \ + --build-arg INSTALL_OPTIONS="${{ matrix.installoptions }}" + else + docker build . \ + --file "${{ matrix.file }}" \ + --tag "ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.tag_latest }}" \ + --build-arg MACH3_VERSION="develop" \ + --build-arg INSTALL_OPTIONS="${{ matrix.installoptions }}" + fi - - name: Push Docker image - run: | - if [ "${{ github.ref_type }}" == 'tag' ]; then - docker push ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.os }}${{ github.ref_name }} - else - docker push ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.tag_latest }} - fi + - name: Push Docker image + run: | + if [ "${{ github.ref_type }}" == "tag" ]; then + docker push "ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.os }}${{ github.ref_name }}" + else + docker push "ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.tag_latest }}" + fi - - name: Delete old images - uses: actions/delete-package-versions@v5 - with: - package-name: 'mach3' - package-type: 'container' - min-versions-to-keep: 5 - delete-only-untagged-versions: 'true' + - name: Delete old images + uses: actions/delete-package-versions@v5 + with: + package-name: 'mach3' + package-type: 'container' + min-versions-to-keep: 5 + delete-only-untagged-versions: 'true' diff --git a/Doc/MaCh3DockerFiles/Alma9/Dockerfile b/Doc/MaCh3DockerFiles/Alma9/Dockerfile index f299eac0d..b1d9daeb5 100644 --- a/Doc/MaCh3DockerFiles/Alma9/Dockerfile +++ b/Doc/MaCh3DockerFiles/Alma9/Dockerfile @@ -40,5 +40,9 @@ ENV MaCh3_ROOT=${MACH3_INSTALL_DIR} ENV PATH=${MaCh3_ROOT}/bin:${PATH} \ LD_LIBRARY_PATH=${MaCh3_ROOT}/lib:${LD_LIBRARY_PATH} +# pip install pyMaCh3 +WORKDIR ${MACH3_WORK_DIR} +RUN pip install . + # Start from MaCh3 install dir WORKDIR ${MACH3_INSTALL_DIR} diff --git a/Doc/MaCh3DockerFiles/Fedora32/Dockerfile b/Doc/MaCh3DockerFiles/Fedora32/Dockerfile index dd8cf1f7e..8f51df245 100644 --- a/Doc/MaCh3DockerFiles/Fedora32/Dockerfile +++ b/Doc/MaCh3DockerFiles/Fedora32/Dockerfile @@ -38,5 +38,9 @@ ENV MaCh3_ROOT=${MACH3_INSTALL_DIR} ENV PATH=${MaCh3_ROOT}/bin:${PATH} \ LD_LIBRARY_PATH=${MaCh3_ROOT}/lib:${LD_LIBRARY_PATH} +# pip install pyMaCh3 +WORKDIR ${MACH3_WORK_DIR} +RUN pip install . + # Start from MaCh3 install dir WORKDIR ${MACH3_INSTALL_DIR} diff --git a/Doc/MaCh3DockerFiles/Rocky9/Dockerfile b/Doc/MaCh3DockerFiles/Rocky9/Dockerfile index c5dd237b6..ae38be7c7 100644 --- a/Doc/MaCh3DockerFiles/Rocky9/Dockerfile +++ b/Doc/MaCh3DockerFiles/Rocky9/Dockerfile @@ -38,5 +38,9 @@ ENV MaCh3_ROOT=${MACH3_INSTALL_DIR} ENV PATH=${MaCh3_ROOT}/bin:${PATH} \ LD_LIBRARY_PATH=${MaCh3_ROOT}/lib:${LD_LIBRARY_PATH} +# pip install pyMaCh3 +WORKDIR ${MACH3_WORK_DIR} +RUN pip install . + # Start from MaCh3 install dir WORKDIR ${MACH3_INSTALL_DIR} diff --git a/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile b/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile index ea571ec8c..60522c02b 100644 --- a/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile +++ b/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile @@ -13,7 +13,7 @@ RUN apt update && apt upgrade -y RUN apt-get install -y nlohmann-json3-dev #MISC_SW -RUN apt install -y --no-install-recommends vim less nano gdb csh tcsh ed quota python3 python3-dev cvs procmail ca-certificates +RUN apt install -y --no-install-recommends vim less nano gdb csh tcsh ed quota python3 python3-dev python3-pip cvs procmail ca-certificates # Declare the build argument ARG MACH3_VERSION @@ -44,5 +44,9 @@ ENV MaCh3_ROOT=${MACH3_INSTALL_DIR} ENV PATH=${MaCh3_ROOT}/bin:${PATH} \ LD_LIBRARY_PATH=${MaCh3_ROOT}/lib:${LD_LIBRARY_PATH} +# pip install pyMaCh3 +WORKDIR ${MACH3_WORK_DIR} +RUN pip install . + # Start from MaCh3 install dir WORKDIR ${MACH3_INSTALL_DIR}