Skip to content

Commit b7c041b

Browse files
Yadan-WeiYadan Wei
andauthored
[PATCH] PyTorch Training Images CVE Patch (#5011)
* Patch nvjpeg for PT TR --------- Co-authored-by: Yadan Wei <[email protected]>
1 parent f13ca64 commit b7c041b

24 files changed

+107
-55
lines changed

pytorch/training/buildspec-2-5-ec2.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework: &FRAMEWORK pytorch
55
version: &VERSION 2.5.1
66
short_version: &SHORT_VERSION "2.5"
77
arch_type: x86
8-
autopatch_build: "True"
8+
# autopatch_build: "True"
99

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY
@@ -21,6 +21,9 @@ context:
2121
changehostname:
2222
source: docker/build_artifacts/changehostname.c
2323
target: changehostname.c
24+
start_cuda_compat:
25+
source: docker/build_artifacts/start_cuda_compat.sh
26+
target: start_cuda_compat.sh
2427
start_with_right_hostname:
2528
source: docker/build_artifacts/start_with_right_hostname.sh
2629
target: start_with_right_hostname.sh

pytorch/training/buildspec-2-5-sm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework: &FRAMEWORK pytorch
55
version: &VERSION 2.5.1
66
short_version: &SHORT_VERSION "2.5"
77
arch_type: x86
8-
autopatch_build: "True"
8+
# autopatch_build: "True"
99

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY

pytorch/training/buildspec-2-6-ec2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework: &FRAMEWORK pytorch
55
version: &VERSION 2.6.0
66
short_version: &SHORT_VERSION "2.6"
77
arch_type: x86
8-
autopatch_build: "True"
8+
# autopatch_build: "True"
99

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY

pytorch/training/buildspec-2-6-sm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework: &FRAMEWORK pytorch
55
version: &VERSION 2.6.0
66
short_version: &SHORT_VERSION "2.6"
77
arch_type: x86
8-
autopatch_build: "True"
8+
# autopatch_build: "True"
99

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY

pytorch/training/buildspec-2-7-ec2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework: &FRAMEWORK pytorch
55
version: &VERSION 2.7.1
66
short_version: &SHORT_VERSION "2.7"
77
arch_type: x86
8-
autopatch_build: "True"
8+
# autopatch_build: "True"
99

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY

pytorch/training/buildspec-2-7-sm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework: &FRAMEWORK pytorch
55
version: &VERSION 2.7.1
66
short_version: &SHORT_VERSION "2.7"
77
arch_type: x86
8-
autopatch_build: "True"
8+
# autopatch_build: "True"
99

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY

pytorch/training/docker/2.5/py3/Dockerfile.cpu

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,18 @@ RUN /opt/conda/bin/mamba install -y -c conda-forge \
166166
fsspec \
167167
"idna>=3.7" \
168168
"tqdm>=4.66.3" \
169-
"requests>=2.32.0" \
170-
"setuptools>=70.0.0" \
171-
"urllib3<2" \
169+
"requests>=2.32.4" \
170+
"setuptools>=80.9.0" \
171+
"urllib3>=2.5.0" \
172172
"awscli<2" \
173173
&& /opt/conda/bin/mamba clean -afy \
174174
&& rm -rf /etc/apt/sources.list.d/*
175175

176176
# Install common pip packages (in case of conda package is not available)
177-
RUN pip install --no-cache-dir opencv-python mpi4py
177+
RUN pip install --no-cache-dir "opencv-python==4.11.0.86" mpi4py
178+
179+
#address pip cve
180+
RUN pip install --no-cache-dir --upgrade "pip>=25.1.1"
178181

179182
RUN curl -o /license.txt https://aws-dlc-licenses.s3.amazonaws.com/pytorch-2.5/license.txt
180183

@@ -298,7 +301,7 @@ RUN pip install --no-cache-dir -U \
298301
"sagemaker>=2,<3" \
299302
"sagemaker-experiments<1" \
300303
sagemaker-pytorch-training \
301-
sagemaker-training
304+
"sagemaker-training>=5.0.0"
302305

303306
# Install extra packages
304307
RUN /opt/conda/bin/mamba install -y -c conda-forge \

pytorch/training/docker/2.5/py3/Dockerfile.ec2.cpu.core_packages.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"accelerate": {
3-
"version_specifier": "==1.1.1",
3+
"version_specifier": "==1.8.1",
44
"skip": "True"
55
},
66
"fastai": {
7-
"version_specifier": "==2.7.18",
7+
"version_specifier": "==2.8.2",
88
"skip": "True"
99
},
1010
"s3torchconnector": {
11-
"version_specifier": "==1.2.6",
11+
"version_specifier": "==1.4.2",
1212
"skip": "True"
1313
},
1414
"torch": {
@@ -43,7 +43,7 @@
4343
"version_specifier": ">=70.0.0"
4444
},
4545
"urllib3": {
46-
"version_specifier": "<2"
46+
"version_specifier": ">=2.5.0"
4747
},
4848
"awscli": {
4949
"version_specifier": "<2"

pytorch/training/docker/2.5/py3/Dockerfile.sagemaker.cpu.core_packages.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"accelerate": {
3-
"version_specifier": "==1.5.1",
3+
"version_specifier": "==1.8.1",
44
"skip": "True"
55
},
66
"fastai": {
7-
"version_specifier": "==2.7.19",
7+
"version_specifier": "==2.8.2",
88
"skip": "True"
99
},
1010
"s3torchconnector": {
11-
"version_specifier": "==1.3.2",
11+
"version_specifier": "==1.4.2",
1212
"skip": "True"
1313
},
1414
"torch": {
@@ -43,7 +43,7 @@
4343
"version_specifier": ">=70.0.0"
4444
},
4545
"urllib3": {
46-
"version_specifier": "<2"
46+
"version_specifier": ">=2.5.0"
4747
},
4848
"awscli": {
4949
"version_specifier": "<2"

pytorch/training/docker/2.5/py3/cu124/Dockerfile.ec2.gpu.core_packages.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"accelerate": {
3-
"version_specifier": "==1.1.1",
3+
"version_specifier": "==1.8.1",
44
"skip": "True"
55
},
66
"fastai": {
7-
"version_specifier": "==2.7.18",
7+
"version_specifier": "==2.8.2",
88
"skip": "True"
99
},
1010
"flash-attn": {
@@ -16,7 +16,7 @@
1616
"skip": "True"
1717
},
1818
"s3torchconnector": {
19-
"version_specifier": "==1.2.6",
19+
"version_specifier": "==1.4.2",
2020
"skip": "True"
2121
},
2222
"torch": {
@@ -51,7 +51,7 @@
5151
"version_specifier": ">=70.0.0"
5252
},
5353
"urllib3": {
54-
"version_specifier": "<2"
54+
"version_specifier": ">=2.5.0"
5555
},
5656
"awscli": {
5757
"version_specifier": "<2"

0 commit comments

Comments
 (0)