Skip to content

Commit 523ec9e

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 7ae730e + 9924a1f commit 523ec9e

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ARG TARGETARCH
2+
3+
FROM quay.io/sclorg/python-312-c9s:c9s AS buildscripts
4+
COPY base-images/utils/aipcc.sh /mnt/aipcc.sh
5+
6+
####################
7+
# base #
8+
####################
9+
FROM quay.io/sclorg/python-312-c9s:c9s AS base
10+
11+
USER 0
12+
13+
RUN \
14+
--mount=from=buildscripts,source=/mnt,target=/mnt \
15+
--mount=type=cache,sharing=locked,id=dnf-c9s,target=/var/cache/dnf \
16+
/bin/bash <<'EOF'
17+
/mnt/aipcc.sh
18+
EOF
19+
20+
# Restore user workspace
21+
USER 1001
22+
WORKDIR /opt/app-root/src
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ARG TARGETARCH
2+
3+
FROM registry.access.redhat.com/ubi9/python-312:latest AS buildscripts
4+
COPY base-images/utils/aipcc.sh /mnt/aipcc.sh
5+
6+
####################
7+
# base #
8+
####################
9+
FROM registry.access.redhat.com/ubi9/python-312:latest AS base
10+
11+
USER 0
12+
13+
RUN \
14+
--mount=from=buildscripts,source=/mnt,target=/mnt \
15+
--mount=type=cache,sharing=locked,id=dnf-ubi9,target=/var/cache/dnf \
16+
/bin/bash <<'EOF'
17+
/mnt/aipcc.sh
18+
EOF
19+
20+
# Restore user workspace
21+
USER 1001
22+
WORKDIR /opt/app-root/src

base-images/utils/aipcc.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
set -Eeuxo pipefail
3+
4+
DNF_OPTS=(-y --nodocs --setopt=install_weak_deps=False --setopt=keepcache=True)
5+
6+
function install_epel() {
7+
dnf install "${DNF_OPTS[@]}" https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
8+
}
9+
10+
function uninstall_epel() {
11+
dnf remove "${DNF_OPTS[@]}" epel-release
12+
}
13+
14+
function main() {
15+
install_epel
16+
trap uninstall_epel EXIT
17+
18+
dnf install "${DNF_OPTS[@]}" zeromq
19+
if ! test -f /usr/lib64/libzmq.so.5; then
20+
echo "Error: libzmq.so.5 was not found after installation"
21+
exit 1
22+
fi
23+
}
24+
25+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
26+
main "$@"
27+
fi

jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,18 @@
4949
" actual_major_minor = get_major_minor(tf.__version__)\n",
5050
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
5151
"\n",
52+
" @unittest.skip(\"https://github.com/onnx/tensorflow-onnx/issues/2329 about Keras 3 incompatibility\")\n",
5253
" def test_tf2onnx_conversion(self):\n",
5354
" # Replace this with an actual TensorFlow model conversion using tf2onnx\n",
5455
" model = tf.keras.Sequential([tf.keras.layers.Dense(1, input_shape=(10,))])\n",
56+
"\n",
57+
" # WORKAROUND: known issue https://github.com/onnx/tensorflow-onnx/issues/2319 with tf 2.15+: the conversion would fail with\n",
58+
" # AttributeError: 'Sequential' object has no attribute 'output_names'. Did you mean: 'output_shape'?\n",
59+
" model.output_names=['output']\n",
60+
"\n",
61+
"\n",
62+
" # known issue https://github.com/keras-team/keras/issues/18430 with tf 2.15+: the conversion would fail with\n",
63+
" # AttributeError: 'Sequential' object has no attribute '_get_save_spec'. Did you mean: '_set_save_spec'?\n",
5564
" onnx_model = tf2onnx.convert.from_keras(model)\n",
5665
"\n",
5766
" self.assertTrue(onnx_model is not None)\n",

0 commit comments

Comments
 (0)