Skip to content

Commit 2f042d4

Browse files
build tf 2.18 with protobuf (#5117)
* build tf 2.18 with protobuf * enable autopatch for 2.18 ec2 * enable autopatch for 2.18 sm * add allowlist and rebuild ec2 * [djl-serving] 0.32.0 lmi image patch release (#5120) * allowlist protobuf ec2 * enable autopatch sm * fix allowlist * rebuild ec2 * rebuild autopatch ec2 * rebuild autopatch sm * rebuild sm * rebuild sm * build ec2 * ec2 build * add protobuf constraint ec2 * ec2 build * build sm * build sm * build sm * build sm * build ec2 * revert toml --------- Co-authored-by: Xin Yang <[email protected]>
1 parent 7366065 commit 2f042d4

7 files changed

+70
-11
lines changed

tensorflow/training/buildspec-2-18-ec2.yml

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

1010
repository_info:
1111
training_repository: &TRAINING_REPOSITORY

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ RUN ${PIP} install --no-cache-dir -U \
157157
&& ${PIP} install --no-cache-dir -U \
158158
h5py \
159159
absl-py \
160-
opencv-python \
161160
werkzeug \
162161
psutil
163162

@@ -188,7 +187,9 @@ ARG TF_URL
188187
RUN ${PIP} install --no-cache-dir -U \
189188
${TF_URL} \
190189
"tensorflow-io==0.37.*" \
191-
"tensorflow-datasets==4.9.7"
190+
"tensorflow-datasets==4.9.7" \
191+
opencv-python
192+
192193

193194
RUN HOME_DIR=/root \
194195
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \

tensorflow/training/docker/2.18/py3/Dockerfile.ec2.cpu.core_packages.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version_specifier": ">=1.33.13,<2"
44
},
55
"protobuf": {
6-
"version_specifier": ">=4.21.12"
6+
"version_specifier": ">=3.19.6,<4.22"
77
},
88
"pyyaml": {
99
"version_specifier": ">=6.0,<6.1"
@@ -18,7 +18,8 @@
1818
"version_specifier": "==2.18.0"
1919
},
2020
"tensorflow-datasets": {
21-
"version_specifier": ">=4.9.4"
21+
"version_specifier": "==4.9.7",
22+
"skip": "True"
2223
},
2324
"tensorflow-io": {
2425
"version_specifier": "==0.37.*"
@@ -27,7 +28,8 @@
2728
"version_specifier": "==0.37.*"
2829
},
2930
"tensorflow-metadata": {
30-
"version_specifier": ">=1.14.0"
31+
"version_specifier": "==1.17.2",
32+
"skip": "True"
3133
},
3234
"urllib3": {
3335
"version_specifier": ">=2.2.2"

tensorflow/training/docker/2.18/py3/Dockerfile.ec2.cpu.os_scan_allowlist.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,5 +2491,32 @@
24912491
"title": "CVE-2022-48434 - libavfilter7, libavformat58 and 7 more",
24922492
"reason_to_ignore": "N/A"
24932493
}
2494+
],
2495+
"protobuf": [
2496+
{
2497+
"description": "Any project that uses Protobuf Pure-Python backend to parse untrusted Protocol Buffers data containing an arbitrary number of recursive groups, recursive messages or a series of SGROUP tags can be corrupted by exceeding the Python recursion limit. This can result in a Denial of service by crashing the application with a RecursionError. We recommend upgrading to version =>6.31.1 or beyond commit 17838beda2943d08b8a9d4df5b68f5f04f26d901",
2498+
"vulnerability_id": "CVE-2025-4565",
2499+
"name": "CVE-2025-4565",
2500+
"package_name": "protobuf",
2501+
"package_details": {
2502+
"file_path": "/usr/local/lib/python3.10/site-packages/protobuf-4.21.12.dist-info/METADATA",
2503+
"name": "protobuf",
2504+
"package_manager": "PYTHON",
2505+
"version": "4.21.12",
2506+
"release": null
2507+
},
2508+
"remediation": { "recommendation": { "text": "None Provided" } },
2509+
"cvss_v3_score": 0.0,
2510+
"cvss_v30_score": 0.0,
2511+
"cvss_v31_score": 0.0,
2512+
"cvss_v2_score": 0.0,
2513+
"cvss_v3_severity": "CRITICAL",
2514+
"source_url": "https://nvd.nist.gov/vuln/detail/CVE-2025-4565",
2515+
"source": "NVD",
2516+
"severity": "HIGH",
2517+
"status": "ACTIVE",
2518+
"title": "CVE-2025-4565 - protobuf",
2519+
"reason_to_ignore": "protobuf upgrade is not possible at the moment - this version has dependency with tensorflow metadata "
2520+
}
24942521
]
24952522
}

tensorflow/training/docker/2.18/py3/cu125/Dockerfile.ec2.gpu.core_packages.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version_specifier": ">=1.33.13,<2"
44
},
55
"protobuf": {
6-
"version_specifier": ">=4.21.12"
6+
"version_specifier": ">=3.19.6,<4.22"
77
},
88
"pyyaml": {
99
"version_specifier": ">=6.0,<6.1"
@@ -18,7 +18,8 @@
1818
"version_specifier": "==2.18.0"
1919
},
2020
"tensorflow-datasets": {
21-
"version_specifier": ">=4.9.4"
21+
"version_specifier": "==4.9.7",
22+
"skip" : "True"
2223
},
2324
"tensorflow-io": {
2425
"version_specifier": "==0.37.*"
@@ -27,7 +28,8 @@
2728
"version_specifier": "==0.37.*"
2829
},
2930
"tensorflow-metadata": {
30-
"version_specifier": ">=1.14.0"
31+
"version_specifier": "==1.17.2",
32+
"skip": "True"
3133
},
3234
"urllib3": {
3335
"version_specifier": ">=2.2.2"

tensorflow/training/docker/2.18/py3/cu125/Dockerfile.ec2.gpu.os_scan_allowlist.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,5 +2491,32 @@
24912491
"title": "CVE-2021-38092 - libswresample3, libpostproc55 and 7 more",
24922492
"reason_to_ignore": "N/A"
24932493
}
2494+
],
2495+
"protobuf": [
2496+
{
2497+
"description": "Any project that uses Protobuf Pure-Python backend to parse untrusted Protocol Buffers data containing an arbitrary number of recursive groups, recursive messages or a series of SGROUP tags can be corrupted by exceeding the Python recursion limit. This can result in a Denial of service by crashing the application with a RecursionError. We recommend upgrading to version =>6.31.1 or beyond commit 17838beda2943d08b8a9d4df5b68f5f04f26d901",
2498+
"vulnerability_id": "CVE-2025-4565",
2499+
"name": "CVE-2025-4565",
2500+
"package_name": "protobuf",
2501+
"package_details": {
2502+
"file_path": "/usr/local/lib/python3.10/site-packages/protobuf-4.21.12.dist-info/METADATA",
2503+
"name": "protobuf",
2504+
"package_manager": "PYTHON",
2505+
"version": "4.21.12",
2506+
"release": null
2507+
},
2508+
"remediation": { "recommendation": { "text": "None Provided" } },
2509+
"cvss_v3_score": 0.0,
2510+
"cvss_v30_score": 0.0,
2511+
"cvss_v31_score": 0.0,
2512+
"cvss_v2_score": 0.0,
2513+
"cvss_v3_severity": "CRITICAL",
2514+
"source_url": "https://nvd.nist.gov/vuln/detail/CVE-2025-4565",
2515+
"source": "NVD",
2516+
"severity": "HIGH",
2517+
"status": "ACTIVE",
2518+
"title": "CVE-2025-4565 - protobuf",
2519+
"reason_to_ignore": "protobuf upgrade is not possible at the moment - this version has dependency with tensorflow metadata "
2520+
}
24942521
]
24952522
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ RUN ${PIP} install --no-cache-dir -U \
219219
mpi4py \
220220
h5py \
221221
absl-py \
222-
opencv-python \
223222
werkzeug \
224223
urllib3
225224

@@ -295,7 +294,8 @@ ARG TF_URL
295294
RUN ${PIP} install --no-cache-dir -U \
296295
${TF_URL} \
297296
"tensorflow-io==0.37.*" \
298-
"tensorflow-datasets==4.9.7"
297+
"tensorflow-datasets==4.9.7" \
298+
opencv-python
299299

300300
RUN HOME_DIR=/root \
301301
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \

0 commit comments

Comments
 (0)