Repository navigation
build: consolidate image cleanup removals #1414
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
Changes from all commits
Commits
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
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
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Apt packages removed from nmp-automodel-base early in the image build. | ||
| flac | ||
| lame | ||
| libflac12t64 | ||
| libmp3lame0 | ||
| libogg0 | ||
| libopus0 | ||
| libsndfile1 | ||
| libsox-fmt-base | ||
| libvorbis0a | ||
| libvorbisenc2 | ||
| libvorbisfile3 | ||
| sox | ||
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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
|
ironcommit marked this conversation as resolved.
Resolved
|
||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Apt packages removed from nmp-rl-base early in the image build. | ||
| # This image currently has no apt package removals. | ||
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 |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Apt packages removed from nmp-unsloth-training early in the image build. | ||
| flac | ||
| lame | ||
| libflac12t64 | ||
| libmp3lame0 | ||
| libogg0 | ||
| libopus0 | ||
| libsndfile1 | ||
| libsox-fmt-base | ||
| libvorbis0a | ||
| libvorbisenc2 | ||
| libvorbisfile3 | ||
| sox |
14 changes: 14 additions & 0 deletions
14
docker/customizer/removals/files/nmp-automodel-training.txt
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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Late cleanup for bundled or non-package-managed files in nmp-automodel-training. | ||
| /opt/venv/lib/python3.*/site-packages/_soundfile_data/libsndfile_*.so | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libFLAC-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavcodec-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavfilter-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavformat-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavutil-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libogg-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libopus-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libsndfile-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libswscale-*.so* | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
3 changes: 1 addition & 2 deletions
3
docker/rl/codec-file-removals.txt → ...omizer/removals/files/nmp-rl-training.txt
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,8 +1,7 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Codec cleanup for release image scans. Remove this file and its | ||
| # Dockerfile call when the upstream image contents no longer need this workaround. | ||
| # Late cleanup for bundled or non-package-managed files in nmp-rl-training. | ||
| /opt/nemo_rl_venv/lib/python3.*/site-packages/_soundfile_data/libsndfile_*.so | ||
| /opt/ray_venvs/*/lib/python3.*/site-packages/_soundfile_data/libsndfile_*.so | ||
| /opt/uv_cache/archive-v0/*/_soundfile_data/libsndfile_*.so |
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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Late cleanup for bundled or non-package-managed files in nmp-unsloth-training. | ||
| /opt/venv/lib/python3.*/site-packages/_soundfile_data/libsndfile_*.so | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libFLAC-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavcodec-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavfilter-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavformat-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libavutil-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libogg-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libopus-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libsndfile-*.so* | ||
| /usr/local/lib/python*/dist-packages/nvidia/dali/.libs/libswscale-*.so* |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| if [ "$#" -ne 1 ]; then | ||
| echo "usage: $0 PACKAGE_LIST" >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| package_list="$1" | ||
| if [ ! -f "${package_list}" ]; then | ||
| echo "missing package list: ${package_list}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| packages=() | ||
|
|
||
| while IFS= read -r package || [ -n "${package}" ]; do | ||
| package="${package%$'\r'}" | ||
| package="${package%%#*}" | ||
| package="$(printf '%s' "${package}" | xargs)" | ||
|
|
||
| if [ -z "${package}" ]; then | ||
| continue | ||
| fi | ||
|
|
||
| if dpkg-query -W -f='${db:Status-Abbrev}' "${package}" 2>/dev/null | grep -q '^ii '; then | ||
| packages+=("${package}") | ||
| fi | ||
| done < "${package_list}" | ||
|
|
||
| if [ "${#packages[@]}" -eq 0 ]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| DEBIAN_FRONTEND="${DEBIAN_FRONTEND:-noninteractive}" apt-get purge -y "${packages[@]}" |
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """Shared helpers for image package minimum-version smoke tests.""" | ||
|
|
||
| from importlib import metadata | ||
|
|
||
| from packaging.version import Version | ||
|
|
||
|
|
||
| def assert_python_package_min_versions(minimum_versions: dict[str, str]) -> None: | ||
| missing: list[str] = [] | ||
| too_old: list[str] = [] | ||
|
|
||
| for distribution, minimum_version in sorted(minimum_versions.items()): | ||
| try: | ||
| actual_version = metadata.version(distribution) | ||
| except metadata.PackageNotFoundError: | ||
| missing.append(distribution) | ||
| continue | ||
|
|
||
| if Version(actual_version) < Version(minimum_version): | ||
| too_old.append(f"{distribution}: expected >= {minimum_version}, got {actual_version}") | ||
|
|
||
| assert missing == [], f"missing expected Python distributions: {missing}" | ||
| assert too_old == [], "Python distributions below minimum versions: " + "; ".join(too_old) |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.