File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 43
43
chmod +x $PATCHING_INFO_PATH /patch-details/install_script_language.sh && \
44
44
$PATCHING_INFO_PATH /patch-details/install_script_language.sh
45
45
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
50
49
fi
51
50
52
51
# 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
69
68
chmod +x /usr/local/bin/start_cuda_compat.sh
70
69
fi
71
70
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
+
72
77
pip cache purge
73
78
74
79
# # Update GPG key in case Nginx exists
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function prune_cuda {
12
12
# - Debugging tools (compute-sanitizer, debugger)
13
13
# - Profiling tools (Nsight Compute, Nsight Systems)
14
14
# - Legacy tools (Visual Profiler)
15
+ # - ELF file processing components
15
16
# This keeps only the essential runtime libraries, headers and development tools
16
17
rm -rf /usr/local/cuda/compute-sanitizer/docs \
17
18
/usr/local/cuda/nsight-compute-**** .* .* /docs \
@@ -24,7 +25,9 @@ function prune_cuda {
24
25
/usr/local/cuda/compute-sanitizer \
25
26
/usr/local/cuda/extras/Debugger \
26
27
/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*
28
31
rm -rf /usr/local/cuda/doc
29
32
rm -rf /usr/local/cuda/samples
30
33
rm -rf /usr/local/cuda/share/doc
Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ RUN chmod +x /usr/local/bin/deep_learning_container.py && \
42
42
${HOME_DIR}/oss_compliance/generate_oss_compliance.sh ${HOME_DIR} ${PYTHON} && \
43
43
# create symlink for python
44
44
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* && \
45
48
# clean up
46
49
rm -rf ${HOME_DIR}/oss_compliance* && \
47
50
rm -rf /tmp/tmp* && \
You can’t perform that action at this time.
0 commit comments