diff --git a/.github/workflows/docker-image-minimum.yaml b/.github/workflows/docker-image-minimum.yaml index 0dd814e..a351293 100644 --- a/.github/workflows/docker-image-minimum.yaml +++ b/.github/workflows/docker-image-minimum.yaml @@ -37,11 +37,6 @@ jobs: type=schedule,pattern={{date 'YYYYMMDD'}},enable=true,priority=1000 type=raw,pattern={{version}},value={{date 'YYYYMMDD-HHmmss'}} type=sha - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v3 - - name: Env - run: | - env|sort - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -98,11 +93,6 @@ jobs: type=schedule,pattern={{date 'YYYYMMDD'}},enable=true,priority=1000 type=raw,pattern={{version}},value={{date 'YYYYMMDD-HHmmss'}} type=sha - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v3 - - name: Env - run: | - env|sort - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -127,7 +117,7 @@ jobs: push: true pull: true sbom: true - outputs: type=image,push=true,compression=uncompressed + outputs: type=image,push=true,compression=estargz tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 9b1ada5..721b5c2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -37,11 +37,6 @@ jobs: type=schedule,pattern={{date 'YYYYMMDD'}},enable=true,priority=1000 type=raw,pattern={{version}},value={{date 'YYYYMMDD-HHmmss'}} type=sha - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v3 - - name: Env - run: | - env|sort - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -67,11 +62,13 @@ jobs: with: context: . push: true - outputs: type=image,push=true,compression=gzip + outputs: type=image,push=true,compression=estargz tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} target: openjij-builder + cache-from: type=gha + cache-to: type=gha,mode=max build-and-push-image-old: runs-on: ubuntu-latest @@ -97,11 +94,6 @@ jobs: type=schedule,pattern={{date 'YYYYMMDD'}},enable=true,priority=1000 type=raw,pattern={{version}},value={{date 'YYYYMMDD-HHmmss'}} type=sha - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v3 - - name: Env - run: | - env|sort - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -127,9 +119,11 @@ jobs: with: context: . push: true - outputs: type=image,push=true,compression=gzip + outputs: type=image,push=true,compression=estargz tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} - target: openjij-builder-old + target: openjij-builder-old + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile index 915e023..6945fc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,47 +1,30 @@ FROM --platform=linux/x86_64 quay.io/pypa/manylinux_2_28_x86_64:latest AS manylinux_2_28 - -FROM manylinux_2_28 AS intel-one-api-install - +COPY config.txt /tmp/config.txt RUN \ - --mount=type=bind,target=/etc/yum.repos.d/oneAPI.repo,source=oneAPI.repo \ - --mount=type=cache,target=/var/cache/dnf \ - --mount=type=cache,target=/var/lib/dnf \ - dnf -y repository-packages "oneAPI" list --available - -RUN \ - --mount=type=bind,target=/etc/yum.repos.d/oneAPI.repo,source=oneAPI.repo \ - --mount=type=cache,target=/var/cache/dnf \ - --mount=type=cache,target=/var/lib/dnf \ - dnf -y install intel-basekit intel-hpckit && \ + --mount=type=tmpfs,target=/var/cache/dnf \ + --mount=type=tmpfs,target=/var/lib/dnf \ + dnf config-manager --set-enabled powertools && \ + dnf -y --enablerepo=powertools install eigen3-devel && \ dnf -y clean all -FROM intel-one-api-install AS intel-one-api-configure - -ONBUILD COPY config.txt /tmp/config.txt - -FROM intel-one-api-configure AS config-txt - -RUN export - -FROM config-txt AS eigen3-devel +#全部入り +FROM manylinux_2_28 AS openjij-builder RUN \ - --mount=type=cache,target=/var/cache/dnf \ - --mount=type=cache,target=/var/lib/dnf \ - dnf config-manager --set-enabled powertools && \ - dnf -y --enablerepo=powertools install eigen3-devel && \ + --mount=type=bind,target=/etc/yum.repos.d/oneAPI.repo,source=oneAPI.repo \ + --mount=type=tmpfs,target=/var/cache/dnf \ + --mount=type=tmpfs,target=/var/lib/dnf \ + dnf -y repository-packages "oneAPI" list --available && \ + dnf -y install intel-basekit intel-hpckit && \ dnf -y clean all -FROM eigen3-devel AS openjij-builder - #軽量バージョン -FROM manylinux_2_28 AS intel-one-api-install-minimum - +FROM manylinux_2_28 AS openjij-builder-minimum RUN \ --mount=type=bind,target=/etc/yum.repos.d/oneAPI.repo,source=oneAPI.repo \ - --mount=type=cache,target=/var/cache/dnf \ - --mount=type=cache,target=/var/lib/dnf \ + --mount=type=tmpfs,target=/var/cache/dnf \ + --mount=type=tmpfs,target=/var/lib/dnf \ dnf -y install \ intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \ intel-oneapi-compiler-fortran \ @@ -49,79 +32,34 @@ RUN \ intel-oneapi-mkl-devel \ intel-oneapi-openmp && \ dnf -y clean all - -# intel-oneapi-python - -FROM intel-one-api-install-minimum AS intel-one-api-configure-minimum - -ONBUILD COPY config.txt /tmp/config.txt - -FROM intel-one-api-configure-minimum AS config-txt-minimum - -FROM config-txt-minimum AS eigen3-devel-minimum - -RUN \ - --mount=type=cache,target=/var/cache/dnf \ - --mount=type=cache,target=/var/lib/dnf \ - dnf config-manager --set-enabled powertools && \ - dnf -y --enablerepo=powertools install eigen3-devel && \ - dnf -y clean all - -FROM eigen3-devel-minimum AS openjij-builder-minimum #古いバージョン FROM --platform=linux/x86_64 quay.io/pypa/manylinux2014_x86_64:latest AS manylinux2014 - -FROM manylinux2014 AS intel-one-api-install-old +COPY config.txt /tmp/config.txt RUN \ - --mount=type=bind,target=/etc/yum.repos.d/oneAPI.repo,source=oneAPI.repo \ - --mount=type=cache,target=/var/cache/yum \ - --mount=type=cache,target=/var/lib/yum \ - yum -y install intel-basekit intel-hpckit - -FROM intel-one-api-install-old AS intel-one-api-configure-old - -ONBUILD COPY config.txt /tmp/config.txt - -FROM intel-one-api-configure-old AS config-txt-old - -RUN export + --mount=type=tmpfs,target=/var/cache/yum \ + --mount=type=tmpfs,target=/var/lib/yum \ + yum -y install eigen3-devel -FROM config-txt-old AS eigen3-devel-old +#全部入り +FROM manylinux2014 AS openjij-builder-old RUN \ - --mount=type=cache,target=/var/cache/yum \ - --mount=type=cache,target=/var/lib/yum \ - yum -y install eigen3-devel - -FROM eigen3-devel-old AS openjij-builder-old + --mount=type=bind,target=/etc/yum.repos.d/oneAPI.repo,source=oneAPI.repo \ + --mount=type=tmpfs,target=/var/cache/yum \ + --mount=type=tmpfs,target=/var/lib/yum \ + yum -y install intel-basekit intel-hpckit #軽量バージョン -FROM manylinux2014 AS intel-one-api-install-old-minimum + +FROM manylinux2014 AS openjij-builder-old-minimum RUN \ --mount=type=bind,target=/etc/yum.repos.d/oneAPI.repo,source=oneAPI.repo \ - --mount=type=cache,target=/var/cache/yum \ - --mount=type=cache,target=/var/lib/yum \ + --mount=type=tmpfs,target=/var/cache/yum \ + --mount=type=tmpfs,target=/var/lib/yum \ yum -y install \ intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \ intel-oneapi-compiler-fortran \ intel-oneapi-mkl \ intel-oneapi-mkl-devel \ intel-oneapi-openmp - -FROM intel-one-api-install-old-minimum AS intel-one-api-configure-old-minimum - -ONBUILD COPY config.txt /tmp/config.txt - -FROM intel-one-api-configure-old-minimum AS config-txt-old-minimum - -RUN export - -FROM config-txt-old-minimum AS eigen3-devel-old-minimum - -RUN \ - --mount=type=cache,target=/var/cache/yum \ - --mount=type=cache,target=/var/lib/yum \ - yum -y install eigen3-devel - -FROM eigen3-devel-old-minimum AS openjij-builder-old-minimum