Skip to content

Commit a8f459f

Browse files
authored
patch tf training 2.19 (#5388)
* patch tf training 2.19 * offboard tf 2.19 training * disable regression test
1 parent f7c297d commit a8f459f

File tree

5 files changed

+152
-146
lines changed

5 files changed

+152
-146
lines changed

tensorflow/training/buildspec-2-19-sm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework: &FRAMEWORK tensorflow
55
version: &VERSION 2.19.0
66
short_version: &SHORT_VERSION "2.19"
77
arch_type: x86
8-
autopatch_build: "True"
8+
# autopatch_build: "True"
99

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY
@@ -42,7 +42,7 @@ images:
4242
tag_python_version: &TAG_PYTHON_VERSION py312
4343
os_version: &OS_VERSION ubuntu22.04
4444
tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *OS_VERSION, "-sagemaker" ]
45-
latest_release_tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *OS_VERSION, "-sagemaker" ]
45+
# latest_release_tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *OS_VERSION, "-sagemaker" ]
4646
docker_file: !join [ docker/, *SHORT_VERSION, /, *DOCKER_PYTHON_VERSION, /Dockerfile., *DEVICE_TYPE ]
4747
# build_tag_override: "pr:2.16.2-cpu-py310-ubuntu20.04-sagemaker-pr-4362-autopatch"
4848
target: sagemaker
@@ -59,7 +59,7 @@ images:
5959
cuda_version: &CUDA_VERSION cu125
6060
os_version: &OS_VERSION ubuntu22.04
6161
tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *CUDA_VERSION, "-", *OS_VERSION, "-sagemaker" ]
62-
latest_release_tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *CUDA_VERSION, "-", *OS_VERSION, "-sagemaker" ]
62+
# latest_release_tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *CUDA_VERSION, "-", *OS_VERSION, "-sagemaker" ]
6363
docker_file: !join [ docker/, *SHORT_VERSION, /, *DOCKER_PYTHON_VERSION, /, *CUDA_VERSION, /Dockerfile., *DEVICE_TYPE ]
6464
# build_tag_override: "pr:2.16.2-gpu-py310-cu123-ubuntu20.04-sagemaker-pr-4362-autopatch"
6565
target: sagemaker

tensorflow/training/docker/2.19/py3/Dockerfile.cpu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ RUN pip install --no-cache-dir -U \
264264
# https://github.com/tensorflow/models/issues/9267
265265
# tf-models does not respect existing installations of TF and always installs open source TF
266266
RUN ${PIP} install \
267-
--default-timeout=300 \
267+
--default-timeout=300 \
268268
--retries 5 \
269269
--no-cache-dir -U \
270270
"tf-models-official==${TF_VERSION}.1" \
@@ -302,6 +302,9 @@ RUN $PYTHON -m pip install --no-cache-dir -U \
302302
# Remove python kernel installed by sparkmagic
303303
RUN /usr/local/bin/jupyter-kernelspec remove -f python3
304304

305+
# Remove ipykernel
306+
RUN rm -rf /usr/local/share/jupyter/kernels/python3/kernel.json
307+
305308
# remove tmp files
306309
RUN rm -rf /tmp/*
307310

tensorflow/training/docker/2.19/py3/Dockerfile.sagemaker.cpu.os_scan_allowlist.json

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -181,97 +181,97 @@
181181
"reason_to_ignore": "N/A"
182182
}
183183
],
184-
"form-data": [
184+
"dpkg": [
185185
{
186-
"description": "Use of Insufficiently Random Values vulnerability in form-data allows HTTP Parameter Pollution (HPP). This vulnerability is associated with program files lib/form_data.Js.\n\nThis issue affects form-data: < 2.5.4, 3.0.0 - 3.0.3, 4.0.0 - 4.0.3.",
187-
"vulnerability_id": "CVE-2025-7783",
188-
"name": "CVE-2025-7783",
189-
"package_name": "form-data",
186+
"description": "It was discovered that dpkg-deb does not properly sanitize directory permissions when extracting a control member into a temporary directory, which is documented as being a safe operation even on untrusted data. This may result in leaving temporary files behind on cleanup. Given automated and repeated execution of dpkg-deb commands on adversarial .deb packages or with well compressible files, placed inside a directory with permissions not allowing removal by a non-root user, this can end up in a DoS scenario due to causing disk quota exhaustion or disk full conditions.",
187+
"vulnerability_id": "CVE-2025-6297",
188+
"name": "CVE-2025-6297",
189+
"package_name": "dpkg",
190190
"package_details": {
191-
"file_path": "/usr/local/lib/python3.12/site-packages/jupyterlab/staging/yarn.lock",
192-
"name": "form-data",
193-
"package_manager": "NODE",
194-
"version": "4.0.2",
191+
"file_path": null,
192+
"name": "dpkg",
193+
"package_manager": "OS",
194+
"version": "1.21.1ubuntu2.3",
195195
"release": null
196196
},
197197
"remediation": {
198198
"recommendation": {
199199
"text": "None Provided"
200200
}
201201
},
202-
"cvss_v3_score": 0.0,
202+
"cvss_v3_score": 8.2,
203203
"cvss_v30_score": 0.0,
204-
"cvss_v31_score": 0.0,
204+
"cvss_v31_score": 8.2,
205205
"cvss_v2_score": 0.0,
206-
"cvss_v3_severity": "CRITICAL",
207-
"title": "CVE-2025-7783 - form-data",
208-
"source": "NVD",
209-
"source_url": "https://nvd.nist.gov/vuln/detail/CVE-2025-7783",
210-
"severity": "CRITICAL",
206+
"cvss_v3_severity": "HIGH",
207+
"source_url": "https://people.canonical.com/~ubuntu-security/cve/2025/CVE-2025-6297.html",
208+
"source": "UBUNTU_CVE",
209+
"severity": "HIGH",
211210
"status": "ACTIVE",
211+
"title": "CVE-2025-6297 - dpkg, libdpkg-perl",
212212
"reason_to_ignore": "N/A"
213213
}
214214
],
215-
"dpkg": [
215+
"libdpkg-perl": [
216216
{
217-
"description": "It was discovered that dpkg-deb does not properly sanitize directory permissions when extracting a control member into a temporary directory, which is documented as being a safe operation even on untrusted data. This may result in leaving temporary files behind on cleanup. Given automated and repeated execution of dpkg-deb commands on adversarial .deb packages or with well compressible files, placed inside a directory with permissions not allowing removal by a non-root user, this can end up in a DoS scenario due to causing disk quota exhaustion or disk full conditions.",
218-
"vulnerability_id": "CVE-2025-6297",
219-
"name": "CVE-2025-6297",
220-
"package_name": "dpkg",
217+
"description": "It was discovered that dpkg-deb does not properly sanitize directory permissions when extracting a control member into a temporary directory, which is documented as being a safe operation even on untrusted data. This may result in leaving temporary files behind on cleanup. Given automated and repeated execution of dpkg-deb commands on adversarial .deb packages or with well compressible files, placed inside a directory with permissions not allowing removal by a non-root user, this can end up in a DoS scenario due to causing disk quota exhaustion or disk full conditions.",
218+
"vulnerability_id": "CVE-2025-6297",
219+
"name": "CVE-2025-6297",
220+
"package_name": "libdpkg-perl",
221221
"package_details": {
222-
"file_path": null,
223-
"name": "dpkg",
224-
"package_manager": "OS",
225-
"version": "1.21.1ubuntu2.3",
222+
"file_path": null,
223+
"name": "libdpkg-perl",
224+
"package_manager": "OS",
225+
"version": "1.21.1ubuntu2.3",
226226
"release": null
227-
},
228-
"remediation": {
229-
"recommendation": {
230-
"text": "None Provided"
231-
}
232-
},
233-
"cvss_v3_score": 8.2,
234-
"cvss_v30_score": 0.0,
235-
"cvss_v31_score": 8.2,
236-
"cvss_v2_score": 0.0,
237-
"cvss_v3_severity": "HIGH",
238-
"source_url": "https://people.canonical.com/~ubuntu-security/cve/2025/CVE-2025-6297.html",
239-
"source": "UBUNTU_CVE",
240-
"severity": "HIGH",
241-
"status": "ACTIVE",
242-
"title": "CVE-2025-6297 - dpkg, libdpkg-perl",
243-
"reason_to_ignore": "N/A"
227+
},
228+
"remediation": {
229+
"recommendation": {
230+
"text": "None Provided"
231+
}
232+
},
233+
"cvss_v3_score": 8.2,
234+
"cvss_v30_score": 0.0,
235+
"cvss_v31_score": 8.2,
236+
"cvss_v2_score": 0.0,
237+
"cvss_v3_severity": "HIGH",
238+
"source_url": "https://people.canonical.com/~ubuntu-security/cve/2025/CVE-2025-6297.html",
239+
"source": "UBUNTU_CVE",
240+
"severity": "HIGH",
241+
"status": "ACTIVE",
242+
"title": "CVE-2025-6297 - dpkg, libdpkg-perl",
243+
"reason_to_ignore": "N/A"
244244
}
245-
],
246-
"libdpkg-perl": [
245+
],
246+
"fast-redact": [
247247
{
248-
"description": "It was discovered that dpkg-deb does not properly sanitize directory permissions when extracting a control member into a temporary directory, which is documented as being a safe operation even on untrusted data. This may result in leaving temporary files behind on cleanup. Given automated and repeated execution of dpkg-deb commands on adversarial .deb packages or with well compressible files, placed inside a directory with permissions not allowing removal by a non-root user, this can end up in a DoS scenario due to causing disk quota exhaustion or disk full conditions.",
249-
"vulnerability_id": "CVE-2025-6297",
250-
"name": "CVE-2025-6297",
251-
"package_name": "libdpkg-perl",
248+
"description": "fast-redact is a package that provides do very fast object redaction. A Prototype Pollution vulnerability in the nestedRestore function of fast-redact version 3.5.0 and before allows attackers to inject properties on Object.prototype via supplying a crafted payload, causing denial of service (DoS) as the minimum consequence. NOTE: the Supplier disputes this because the reporter only demonstrated access to properties by an internal utility function, and there is no means for achieving prototype pollution via the public API.",
249+
"vulnerability_id": "CVE-2025-57319",
250+
"name": "CVE-2025-57319",
251+
"package_name": "fast-redact",
252252
"package_details": {
253-
"file_path": null,
254-
"name": "libdpkg-perl",
255-
"package_manager": "OS",
256-
"version": "1.21.1ubuntu2.3",
253+
"file_path": "/usr/local/lib/python3.12/site-packages/jupyterlab/staging/yarn.lock",
254+
"name": "fast-redact",
255+
"package_manager": "NODE",
256+
"version": "3.5.0",
257257
"release": null
258-
},
259-
"remediation": {
260-
"recommendation": {
261-
"text": "None Provided"
262-
}
263-
},
264-
"cvss_v3_score": 8.2,
265-
"cvss_v30_score": 0.0,
266-
"cvss_v31_score": 8.2,
267-
"cvss_v2_score": 0.0,
268-
"cvss_v3_severity": "HIGH",
269-
"source_url": "https://people.canonical.com/~ubuntu-security/cve/2025/CVE-2025-6297.html",
270-
"source": "UBUNTU_CVE",
271-
"severity": "HIGH",
272-
"status": "ACTIVE",
273-
"title": "CVE-2025-6297 - dpkg, libdpkg-perl",
274-
"reason_to_ignore": "N/A"
258+
},
259+
"remediation": {
260+
"recommendation": {
261+
"text": "None Provided"
262+
}
263+
},
264+
"cvss_v3_score": 7.5,
265+
"cvss_v30_score": 0.0,
266+
"cvss_v31_score": 7.5,
267+
"cvss_v2_score": 0.0,
268+
"cvss_v3_severity": "HIGH",
269+
"source_url": "https://nvd.nist.gov/vuln/detail/CVE-2025-57319",
270+
"source": "NVD",
271+
"severity": "HIGH",
272+
"status": "ACTIVE",
273+
"title": "CVE-2025-57319 - fast-redact",
274+
"reason_to_ignore": "N/A"
275275
}
276276
]
277277
}

tensorflow/training/docker/2.19/py3/cu125/Dockerfile.gpu

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ RUN mkdir -p /tmp/nvjpeg \
236236
&& rm -rf /tmp/nvjpeg \
237237
# patch cuobjdump and nvdisasm
238238
&& rm -rf /usr/local/cuda/bin/cuobjdump* \
239-
&& rm -rf /usr/local/cuda/bin/nvdisasm*
239+
&& rm -rf /usr/local/cuda/bin/nvdisasm*
240240

241241
ADD https://raw.githubusercontent.com/aws/deep-learning-containers/master/src/deep_learning_container.py /usr/local/bin/deep_learning_container.py
242242
RUN chmod +x /usr/local/bin/deep_learning_container.py
@@ -333,7 +333,7 @@ RUN pip install --no-cache-dir -U \
333333
# https://github.com/tensorflow/models/issues/9267
334334
# tf-models does not respect existing installations of TF and always installs open source TF
335335
RUN ${PIP} install \
336-
--default-timeout=300 \
336+
--default-timeout=300 \
337337
--retries 5 \
338338
--no-cache-dir -U \
339339
"tf-models-official==${TF_VERSION}.1" \
@@ -342,8 +342,8 @@ RUN ${PIP} install \
342342
&& ${PIP} install --no-cache-dir -U \
343343
${TF_URL} \
344344
"tensorflow-io==0.37.*" \
345-
tensorflow-datasets
346-
345+
tensorflow-datasets
346+
347347
# Install rust and cargo
348348
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
349349
ENV PATH="/root/.cargo/bin:${PATH}"
@@ -386,6 +386,9 @@ ENV TF_AUTOTUNE_THRESHOLD=2
386386
# Remove python kernel installed by sparkmagic
387387
RUN /usr/local/bin/jupyter-kernelspec remove -f python3
388388

389+
# Remove ipykernel
390+
RUN rm -rf /usr/local/share/jupyter/kernels/python3/kernel.json
391+
389392
# remove tmp files
390393
RUN rm -rf /tmp/*
391394

0 commit comments

Comments
 (0)