-
Notifications
You must be signed in to change notification settings - Fork 7
Chore/improve nf base images gh action #276
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
Open
nss10
wants to merge
9
commits into
master
Choose a base branch
from
chore/improve_nf_base_images_gh_Action
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3a6591b
Push image directly to ecr to fix "no space left on device" error
nss10 2d13414
Update docker files for nextflow base images to reduce layers
nss10 43b7559
Test with current branch's Dockerfiles
nss10 cfcbc95
Remove branch name in base image checkout
nss10 6647e4b
Build for amd64
nss10 3894192
Update get_layers to fetch manifest layers when image is built using …
nss10 c40a9b3
Improve manifest fetching with response logging
nss10 081ef25
change containers repo branch to get Dockerfiles from master
nss10 e488a9d
Consistent line logs and indentation fix
paulineribeyre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 33 additions & 24 deletions
57
nextflow-base-images/gen3-cuda-11.8-ubuntu22.04-openssl/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,45 @@ | ||
| # Use the specified base image | ||
| FROM nvcr.io/nvidia/cuda:11.8.0-base-ubuntu22.04 | ||
|
|
||
| RUN apt-get purge -y --auto-remove openssl && apt-get autoremove && apt-get autoclean | ||
| FROM nvcr.io/nvidia/cuda:11.8.0-base-ubuntu22.04 AS openssl-builder | ||
|
|
||
| RUN apt-get update && apt-get -y upgrade && apt install -y wget | ||
| # Install build deps only | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| wget \ | ||
| ca-certificates && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN apt install -y build-essential && \ | ||
| apt-get install -y python3 && \ | ||
| apt-get install -y python3-pip | ||
|
|
||
| # install openssl 3.0.8 as it is required for FIPS compliance. | ||
| WORKDIR /tmp | ||
| RUN wget https://www.openssl.org/source/openssl-3.0.8.tar.gz && \ | ||
| tar -xzvf openssl-3.0.8.tar.gz && \ | ||
| rm openssl-3.0.8.tar.gz | ||
| tar -xzf openssl-3.0.8.tar.gz | ||
|
|
||
| WORKDIR /tmp/openssl-3.0.8 | ||
| RUN ./Configure enable-fips && \ | ||
| make && \ | ||
| make install | ||
| RUN ./Configure enable-fips && make -j$(nproc) && make install_sw install_ssldirs | ||
|
|
||
| # Changing adding `/usr/local/lib` as a prefix to LD_LIBRARY_PATH will | ||
| # give precedence to OpenSSL 3.0.8 library files over the 3.0.2 | ||
|
Comment on lines
-23
to
-24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove this comment? |
||
| ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH | ||
| FROM nvcr.io/nvidia/cuda:11.8.0-base-ubuntu22.04 | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Make config changes ti ensure FIPS compliance | ||
| RUN sed -i 's$# .include fipsmodule.cnf$.include /usr/local/ssl/fipsmodule.cnf$g' /usr/local/ssl/openssl.cnf | ||
| RUN sed -i 's$providers = provider_sect$providers = provider_sect\nalg_section = algorithm_sect$g' /usr/local/ssl/openssl.cnf | ||
| RUN sed -i 's$# fips = fips_sect$fips = fips_sect$g' /usr/local/ssl/openssl.cnf | ||
| RUN sed -i -e 's$# activate = 1$activate = 1 \n\n[algorithm_sect]\ndefault_properties = fips=yes$g' /usr/local/ssl/openssl.cnf | ||
| # Install runtime deps only | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| python3 \ | ||
| python3-pip \ | ||
| libglib2.0-0 && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Copy OpenSSL runtime artifacts only | ||
| COPY --from=openssl-builder /usr/local/ssl /usr/local/ssl | ||
| COPY --from=openssl-builder /usr/local/lib /usr/local/lib | ||
| COPY --from=openssl-builder /usr/local/lib64 /usr/local/lib64 | ||
| COPY --from=openssl-builder /usr/local/bin/openssl /usr/local/bin/openssl | ||
|
|
||
| ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH | ||
| ENV OPENSSL_CONF=/usr/local/ssl/openssl.cnf | ||
|
|
||
| # Clean up the temporary directory | ||
| # FIPS config | ||
| RUN sed -i 's$# .include fipsmodule.cnf$.include /usr/local/ssl/fipsmodule.cnf$g' /usr/local/ssl/openssl.cnf && \ | ||
| sed -i 's$providers = provider_sect$providers = provider_sect\nalg_section = algorithm_sect$g' /usr/local/ssl/openssl.cnf && \ | ||
| sed -i 's$# fips = fips_sect$fips = fips_sect$g' /usr/local/ssl/openssl.cnf && \ | ||
| sed -i -e 's$# activate = 1$activate = 1 \n\n[algorithm_sect]\ndefault_properties = fips=yes$g' /usr/local/ssl/openssl.cnf | ||
| WORKDIR / | ||
| RUN rm -rf /tmp/openssl-3.0.8 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 33 additions & 24 deletions
57
nextflow-base-images/gen3-cuda-12.3-ubuntu22.04-openssl/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,45 @@ | ||
| # Use the specified base image | ||
| FROM nvcr.io/nvidia/cuda:12.3.1-base-ubuntu22.04 | ||
|
|
||
| RUN apt-get purge -y --auto-remove openssl && apt-get autoremove && apt-get autoclean | ||
| FROM nvcr.io/nvidia/cuda:12.3.1-base-ubuntu22.04 AS openssl-builder | ||
|
|
||
| RUN apt-get update && apt-get -y upgrade && apt install -y wget | ||
| # Install build deps only | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| wget \ | ||
| ca-certificates && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN apt install -y build-essential && \ | ||
| apt-get install -y python3 && \ | ||
| apt-get install -y python3-pip | ||
|
|
||
| # install openssl 3.0.8 as it is required for FIPS compliance. | ||
| WORKDIR /tmp | ||
| RUN wget https://www.openssl.org/source/openssl-3.0.8.tar.gz && \ | ||
| tar -xzvf openssl-3.0.8.tar.gz && \ | ||
| rm openssl-3.0.8.tar.gz | ||
| tar -xzf openssl-3.0.8.tar.gz | ||
|
|
||
| WORKDIR /tmp/openssl-3.0.8 | ||
| RUN ./Configure enable-fips && \ | ||
| make && \ | ||
| make install | ||
| RUN ./Configure enable-fips && make -j$(nproc) && make install_sw install_ssldirs | ||
|
|
||
| # Changing adding `/usr/local/lib` as a prefix to LD_LIBRARY_PATH will | ||
| # give precedence to OpenSSL 3.0.8 library files over the 3.0.2 | ||
| ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH | ||
| FROM nvcr.io/nvidia/cuda:12.3.1-base-ubuntu22.04 | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Make config changes ti ensure FIPS compliance | ||
| RUN sed -i 's$# .include fipsmodule.cnf$.include /usr/local/ssl/fipsmodule.cnf$g' /usr/local/ssl/openssl.cnf | ||
| RUN sed -i 's$providers = provider_sect$providers = provider_sect\nalg_section = algorithm_sect$g' /usr/local/ssl/openssl.cnf | ||
| RUN sed -i 's$# fips = fips_sect$fips = fips_sect$g' /usr/local/ssl/openssl.cnf | ||
| RUN sed -i -e 's$# activate = 1$activate = 1 \n\n[algorithm_sect]\ndefault_properties = fips=yes$g' /usr/local/ssl/openssl.cnf | ||
| # Install runtime deps only | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| python3 \ | ||
| python3-pip \ | ||
| libglib2.0-0 && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Copy OpenSSL runtime artifacts only | ||
| COPY --from=openssl-builder /usr/local/ssl /usr/local/ssl | ||
| COPY --from=openssl-builder /usr/local/lib /usr/local/lib | ||
| COPY --from=openssl-builder /usr/local/lib64 /usr/local/lib64 | ||
| COPY --from=openssl-builder /usr/local/bin/openssl /usr/local/bin/openssl | ||
|
|
||
| ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH | ||
| ENV OPENSSL_CONF=/usr/local/ssl/openssl.cnf | ||
|
|
||
| # Clean up the temporary directory | ||
| # FIPS config | ||
| RUN sed -i 's$# .include fipsmodule.cnf$.include /usr/local/ssl/fipsmodule.cnf$g' /usr/local/ssl/openssl.cnf && \ | ||
| sed -i 's$providers = provider_sect$providers = provider_sect\nalg_section = algorithm_sect$g' /usr/local/ssl/openssl.cnf && \ | ||
| sed -i 's$# fips = fips_sect$fips = fips_sect$g' /usr/local/ssl/openssl.cnf && \ | ||
| sed -i -e 's$# activate = 1$activate = 1 \n\n[algorithm_sect]\ndefault_properties = fips=yes$g' /usr/local/ssl/openssl.cnf | ||
| WORKDIR / | ||
| RUN rm -rf /tmp/openssl-3.0.8 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you added a few things - ca-certificates here, libglib2.0-0 and OPENSSL_CONF later. For my sake could you explain the changes?