Skip to content

Commit dea45f8

Browse files
authored
Remove unused binaries (#4949)
* Remove unused binaries * test TF * test base * test vllm * retest TF * test PT arm64 * Restore ['dlc_developer_config.toml'] dlc_developer_config.toml: ('Restore to ' 'https://raw.githubusercontent.com/aws/deep-learning-containers/master/dlc_developer_config.toml')
1 parent 50bdefc commit dea45f8

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

miscellaneous_scripts/dockerfile_patch_script.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ fi
4343
chmod +x $PATCHING_INFO_PATH/patch-details/install_script_language.sh && \
4444
$PATCHING_INFO_PATH/patch-details/install_script_language.sh
4545

46-
# Upgrade sagemaker-training package to latest
47-
# For PT 2.7 sagemaker has dependency on protobuf 3.20.3 and sagemaker-training 4.8.3
48-
if pip show sagemaker-training; then
49-
pip install "sagemaker-training>4.7.4,<=4.8.3" --upgrade
46+
# Upgrade sagemaker-training
47+
if [[ $LATEST_RELEASED_IMAGE_URI =~ ^763104351884\.dkr\.ecr\.us-west-2\.amazonaws\.com/pytorch-training:2\.[4-6](.+)sagemaker ]]; then
48+
pip install "sagemaker-training>4.7.4,<5" --upgrade
5049
fi
5150

5251
# For PT inference sagemaker images, replace torchserve-entrypoint.py with the latest one
@@ -69,6 +68,12 @@ if [[ $LATEST_RELEASED_IMAGE_URI =~ ^763104351884\.dkr\.ecr\.us-west-2\.amazonaw
6968
chmod +x /usr/local/bin/start_cuda_compat.sh
7069
fi
7170

71+
# For all GPU images, remove cuobjdump and nvdisasm
72+
if [[ $LATEST_RELEASED_IMAGE_URI =~ ^763104351884\.dkr\.ecr\.us-west-2\.amazonaws\.com/(pytorch|tensorflow)(.+)gpu(.+) ]]; then
73+
rm -rf /usr/local/cuda/bin/cuobjdump*
74+
rm -rf /usr/local/cuda/bin/nvdisasm*
75+
fi
76+
7277
pip cache purge
7378

7479
## Update GPG key in case Nginx exists

scripts/install_cuda.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function prune_cuda {
1212
# - Debugging tools (compute-sanitizer, debugger)
1313
# - Profiling tools (Nsight Compute, Nsight Systems)
1414
# - Legacy tools (Visual Profiler)
15+
# - ELF file processing components
1516
# This keeps only the essential runtime libraries, headers and development tools
1617
rm -rf /usr/local/cuda/compute-sanitizer/docs \
1718
/usr/local/cuda/nsight-compute-****.*.*/docs \
@@ -24,7 +25,9 @@ function prune_cuda {
2425
/usr/local/cuda/compute-sanitizer \
2526
/usr/local/cuda/extras/Debugger \
2627
/usr/local/cuda/nsight-compute-****.*.* \
27-
/usr/local/cuda/nsight-systems-****.*.*
28+
/usr/local/cuda/nsight-systems-****.*.* \
29+
/usr/local/cuda/bin/cuobjdump* \
30+
/usr/local/cuda/bin/nvdisasm*
2831
rm -rf /usr/local/cuda/doc
2932
rm -rf /usr/local/cuda/samples
3033
rm -rf /usr/local/cuda/share/doc

vllm/x86_64/gpu/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ RUN chmod +x /usr/local/bin/deep_learning_container.py && \
4242
${HOME_DIR}/oss_compliance/generate_oss_compliance.sh ${HOME_DIR} ${PYTHON} && \
4343
# create symlink for python
4444
ln -s /usr/bin/python3 /usr/bin/python && \
45+
# remove cuobjdump and nvdisasm
46+
rm -rf /usr/local/cuda/bin/cuobjdump* && \
47+
rm -rf /usr/local/cuda/bin/nvdisasm* && \
4548
# clean up
4649
rm -rf ${HOME_DIR}/oss_compliance* && \
4750
rm -rf /tmp/tmp* && \

0 commit comments

Comments
 (0)