[2026-04-16T19:41:22,230475909+00:00] Upload SBOM INFO: Using mounted CA bundle: /mnt/trusted-ca/ca-bundle.crt '/mnt/trusted-ca/ca-bundle.crt' -> '/etc/pki/ca-trust/source/anchors/ca-bundle.crt' Using token for quay.io/opendatahub/sklearn-serving-runtime Pushing sbom to registry Executing: cosign attach sbom --sbom sbom.json --type spdx quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412@sha256:e8dc35fb00a3c252e5b55911b73bd460ea9f22553ae6186a542c73e32abbc515 quay.io/opendatahub/sklearn-serving-runtime@sha256:de317d3026b07df4946ca3d9ec323f43d98c72ea619f7058ace16722dec916ad [2026-04-16T19:41:24,664206170+00:00] End upload-sbom 2026/04/16 19:38:53 Entrypoint initialization 2026/04/16 19:38:53 Decoded script /tekton/scripts/script-1-mfrhc 2026/04/16 19:38:53 Decoded script /tekton/scripts/script-2-s778d 2026/04/16 19:38:53 Decoded script /tekton/scripts/script-3-hc25g 2026/04/16 19:38:53 Decoded script /tekton/scripts/script-4-p6sl2 2026/04/16 19:38:53 Decoded script /tekton/scripts/script-5-mrnmq Using token for quay.io/opendatahub/kserve Executing: oras blob fetch --registry-config /tmp/use-oci.sh.UrB8rK/auth-Uj7evn.json quay.io/opendatahub/kserve@sha256:71bc81675e58df8a64e2ab99fcb53eb8fe1e378b7b762beee2d845d8f8e116c5 --output - Restored artifact quay.io/opendatahub/kserve@sha256:71bc81675e58df8a64e2ab99fcb53eb8fe1e378b7b762beee2d845d8f8e116c5 to /var/workdir/source WARN: artifact URI not provided, (given: =/var/workdir/cachi2) echo "[$(date --utc -Ins)] Prepare connection" [2026-04-16T19:38:58,756556815+00:00] Prepare connection mkdir -p ~/.ssh if [ -e "/ssh/error" ]; then #no server could be provisioned cat /ssh/error exit 1 fi export SSH_HOST=$(cat /ssh/host) if [ "$SSH_HOST" == "localhost" ] ; then IS_LOCALHOST=true echo "Localhost detected; running build in cluster" elif [ -e "/ssh/otp" ]; then curl --cacert /ssh/otp-ca -XPOST -d @/ssh/otp $(cat /ssh/otp-server) >~/.ssh/id_rsa echo "" >> ~/.ssh/id_rsa else cp /ssh/id_rsa ~/.ssh fi Localhost detected; running build in cluster mkdir -p scripts if ! [[ $IS_LOCALHOST ]]; then echo "[$(date --utc -Ins)] Setup VM" if [[ "$BUILDAH_HTTP_PROXY" =~ .+\.cluster\.local ]]; then echo "[$(date --utc -Ins)] Ignoring cluster local proxy for remote build" unset BUILDAH_HTTP_PROXY BUILDAH_NO_PROXY fi chmod 0400 ~/.ssh/id_rsa export BUILD_DIR=$(cat /ssh/user-dir) export SSH_ARGS="-o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=10" echo "$BUILD_DIR" # shellcheck disable=SC2086 ssh $SSH_ARGS "$SSH_HOST" mkdir -p "${BUILD_DIR@Q}/workspaces" "${BUILD_DIR@Q}/scripts" "${BUILD_DIR@Q}/volumes" PORT_FORWARD="" PODMAN_PORT_FORWARD="" if [ -n "$JVM_BUILD_WORKSPACE_ARTIFACT_CACHE_PORT_80_TCP_ADDR" ] ; then PORT_FORWARD=" -L 80:$JVM_BUILD_WORKSPACE_ARTIFACT_CACHE_PORT_80_TCP_ADDR:80" PODMAN_PORT_FORWARD=" -e JVM_BUILD_WORKSPACE_ARTIFACT_CACHE_PORT_80_TCP_ADDR=localhost" fi echo "[$(date --utc -Ins)] Rsync data" rsync -razW /shared/ "$SSH_HOST:$BUILD_DIR/volumes/shared/" rsync -razW /var/workdir/ "$SSH_HOST:$BUILD_DIR/volumes/workdir/" rsync -razW /entitlement/ "$SSH_HOST:$BUILD_DIR/volumes/etc-pki-entitlement/" rsync -razW /activation-key/ "$SSH_HOST:$BUILD_DIR/volumes/activation-key/" rsync -razW /additional-secret/ "$SSH_HOST:$BUILD_DIR/volumes/additional-secret/" rsync -razW /mnt/trusted-ca/ "$SSH_HOST:$BUILD_DIR/volumes/trusted-ca/" rsync -razW /mnt/proxy-ca-bundle/ "$SSH_HOST:$BUILD_DIR/volumes/proxy-ca-bundle/" rsync -razW "$HOME/.docker/" "$SSH_HOST:$BUILD_DIR/.docker/" rsync -razW --mkpath "/usr/bin/retry" "$SSH_HOST:$BUILD_DIR/usr/bin/retry" rsync -razW "/tekton/results/" "$SSH_HOST:$BUILD_DIR/results/" fi if [ "${IMAGE_APPEND_PLATFORM}" == "true" ]; then IMAGE="${IMAGE}-${PLATFORM//[^a-zA-Z0-9]/-}" export IMAGE fi cat >scripts/script-build.sh <<'REMOTESSHEOF' #!/bin/bash set -euo pipefail cd /var/workdir function set_proxy { if [ -n "${BUILDAH_HTTP_PROXY}" ]; then echo "[$(date --utc -Ins)] Setting proxy to ${BUILDAH_HTTP_PROXY}" export HTTP_PROXY="${BUILDAH_HTTP_PROXY}" export HTTPS_PROXY="${BUILDAH_HTTP_PROXY}" export ALL_PROXY="${BUILDAH_HTTP_PROXY}" if [ -n "${BUILDAH_NO_PROXY}" ]; then echo "[$(date --utc -Ins)] Bypassing proxy for ${BUILDAH_NO_PROXY}" export NO_PROXY="${BUILDAH_NO_PROXY}" fi fi } function unset_proxy { echo "[$(date --utc -Ins)] Unsetting proxy" unset HTTP_PROXY HTTPS_PROXY ALL_PROXY NO_PROXY } echo "[$(date --utc -Ins)] Validate context path" if [ -z "$CONTEXT" ]; then echo "WARNING: CONTEXT is empty. Defaulting to '.' (the source directory)." >&2 CONTEXT="." fi source_dir_path=$(realpath "$SOURCE_CODE_DIR") context_dir_path=$(realpath "$SOURCE_CODE_DIR/$CONTEXT") case "$context_dir_path" in "$source_dir_path" | "$source_dir_path/"*) # path is valid, do nothing ;; *) echo "ERROR: The CONTEXT parameter ('$CONTEXT') is invalid because it escapes the source directory." >&2 echo "Source path: $source_dir_path" >&2 echo "Resolved path: $context_dir_path" >&2 exit 1 ;; esac echo "[$(date --utc -Ins)] Update CA trust" ca_bundle=/mnt/trusted-ca/ca-bundle.crt proxy_ca_bundle=/mnt/proxy-ca-bundle/ca-bundle.crt update_ca_trust=false if [ -f "$ca_bundle" ]; then echo "[$(date --utc -Ins)] Using mounted CA bundle: $ca_bundle" cp -vf $ca_bundle /etc/pki/ca-trust/source/anchors/ca-bundle.crt update_ca_trust=true fi if [ -f "$proxy_ca_bundle" ] && [ -n "${BUILDAH_HTTP_PROXY}" ]; then echo "[$(date --utc -Ins)] Using mounted proxy CA bundle: $proxy_ca_bundle" cp -vf $proxy_ca_bundle /etc/pki/ca-trust/source/anchors/proxy-ca-bundle.crt update_ca_trust=true fi if [ "$update_ca_trust" = "true" ]; then update-ca-trust fi echo "[$(date --utc -Ins)] Prepare Dockerfile" if [ -e "$SOURCE_CODE_DIR/$CONTEXT/$DOCKERFILE" ]; then dockerfile_path="$(pwd)/$SOURCE_CODE_DIR/$CONTEXT/$DOCKERFILE" elif [ -e "$SOURCE_CODE_DIR/$DOCKERFILE" ]; then dockerfile_path="$(pwd)/$SOURCE_CODE_DIR/$DOCKERFILE" elif [ -e "$DOCKERFILE" ]; then # Instrumented builds (SAST) use this custom dockerfile step as their base dockerfile_path="$DOCKERFILE" elif echo "$DOCKERFILE" | grep -q "^https\?://"; then echo "Fetch Dockerfile from $DOCKERFILE" dockerfile_path=$(mktemp --suffix=-Dockerfile) http_code=$(curl -s -S -L -w "%{http_code}" --output "$dockerfile_path" "$DOCKERFILE") if [ "$http_code" != 200 ]; then echo "No Dockerfile is fetched. Server responds $http_code" exit 1 fi http_code=$(curl -s -S -L -w "%{http_code}" --output "$dockerfile_path.dockerignore.tmp" "$DOCKERFILE.dockerignore") if [ "$http_code" = 200 ]; then echo "Fetched .dockerignore from $DOCKERFILE.dockerignore" mv "$dockerfile_path.dockerignore.tmp" "$SOURCE_CODE_DIR/$CONTEXT/.dockerignore" fi else echo "Cannot find Dockerfile $DOCKERFILE" exit 1 fi dockerfile_copy=$(mktemp --tmpdir "$(basename "$dockerfile_path").XXXXXX") cp "$dockerfile_path" "$dockerfile_copy" # Inject the image content manifest into the container we are producing. # This will generate the content-sets.json file and copy it by appending a COPY # instruction to the Containerfile. icm_opts=() if [ "${ICM_KEEP_COMPAT_LOCATION}" = "true" ]; then icm_opts+=(-c) fi if [ "${SKIP_INJECTIONS}" = "false" ]; then inject-icm-to-containerfile "${icm_opts[@]}" "$dockerfile_copy" "/var/workdir/cachi2/output/bom.json" "$SOURCE_CODE_DIR/$CONTEXT" fi echo "[$(date --utc -Ins)] Prepare system (architecture: $(uname -m))" # Fixing group permission on /var/lib/containers chown root:root /var/lib/containers sed -i 's/^\s*short-name-mode\s*=\s*.*/short-name-mode = "disabled"/' /etc/containers/registries.conf # Setting new namespace to run buildah - 2^32-2 echo 'root:1:4294967294' | tee -a /etc/subuid >>/etc/subgid build_args=() if [ -n "${BUILD_ARGS_FILE}" ]; then # Parse BUILD_ARGS_FILE ourselves because dockerfile-json doesn't support it echo "Parsing ARGs from $BUILD_ARGS_FILE" mapfile -t build_args < <( # https://www.mankier.com/1/buildah-build#--build-arg-file # delete lines that start with # # delete blank lines sed -e '/^#/d' -e '/^\s*$/d' "${SOURCE_CODE_DIR}/${BUILD_ARGS_FILE}" ) fi LABELS=() ANNOTATIONS=() # Append any annotations from the specified file if [ -n "${ANNOTATIONS_FILE}" ] && [ -f "${SOURCE_CODE_DIR}/${ANNOTATIONS_FILE}" ]; then echo "Reading annotations from file: ${SOURCE_CODE_DIR}/${ANNOTATIONS_FILE}" while IFS= read -r line || [[ -n "$line" ]]; do # Skip empty lines and comments if [[ -n "$line" && ! "$line" =~ ^[[:space:]]*# ]]; then ANNOTATIONS+=("--annotation" "$line") fi done <"${SOURCE_CODE_DIR}/${ANNOTATIONS_FILE}" fi # Split `args` into two sets of arguments. while [[ $# -gt 0 ]]; do case $1 in --build-args) shift # Note: this may result in multiple --build-arg=KEY=value flags with the same KEY being # passed to buildah. In that case, the *last* occurrence takes precedence. This is why # we append BUILD_ARGS after the content of the BUILD_ARGS_FILE while [[ $# -gt 0 && $1 != --* ]]; do build_args+=("$1") shift done ;; --labels) shift while [[ $# -gt 0 && $1 != --* ]]; do LABELS+=("--label" "$1") shift done ;; --annotations) shift while [[ $# -gt 0 && $1 != --* ]]; do ANNOTATIONS+=("--annotation" "$1") shift done ;; *) echo "unexpected argument: $1" >&2 exit 2 ;; esac done BUILD_ARG_FLAGS=() for build_arg in "${build_args[@]}"; do BUILD_ARG_FLAGS+=("--build-arg=$build_arg") done # Dockerfile-json cannot parse Buildah's host variables, we have to pass them manually BUILDAH_INFO=$(buildah info) BUILDAH_OS=$(jq -r '.host.os' <<<"$BUILDAH_INFO") BUILDAH_ARCH=$(jq -r '.host.arch' <<<"$BUILDAH_INFO") BUILDAH_VARIANT=$(jq -r '.host.variant' <<<"$BUILDAH_INFO") BUILDAH_PLATFORM="${BUILDAH_OS}/${BUILDAH_ARCH}" DOCKERFILE_ARG_FLAGS=() # Reference for variables: # https://docs.docker.com/build/building/variables/#pre-defined-build-arguments PREFIXES=('BUILD' 'TARGET') for PREFIX in "${PREFIXES[@]}"; do DOCKERFILE_ARG_FLAGS+=("--build-arg=${PREFIX}PLATFORM=${BUILDAH_PLATFORM}") DOCKERFILE_ARG_FLAGS+=("--build-arg=${PREFIX}OS=${BUILDAH_OS}") DOCKERFILE_ARG_FLAGS+=("--build-arg=${PREFIX}ARCH=${BUILDAH_ARCH}") DOCKERFILE_ARG_FLAGS+=("--build-arg=${PREFIX}VARIANT=${BUILDAH_VARIANT}") done DOCKERFILE_ARG_FLAGS+=("${BUILD_ARG_FLAGS[@]}") dockerfile-json "${DOCKERFILE_ARG_FLAGS[@]}" "$dockerfile_copy" >/shared/parsed_dockerfile.json BASE_IMAGES=$( jq -r '.Stages[] | select(.From | .Stage or .Scratch | not) | .BaseName | select(test("^oci-archive:") | not)' /shared/parsed_dockerfile.json | tr -d '"' | tr -d "'" ) BUILDAH_ARGS=() UNSHARE_ARGS=() if [ "${HERMETIC}" == "true" ]; then BUILDAH_ARGS+=("--pull=never") UNSHARE_ARGS+=("--net") buildah_retries=3 set_proxy for image in $BASE_IMAGES; do if ! retry unshare -Ufp --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 --mount -- buildah pull --retry "$buildah_retries" "$image"; then echo "Failed to pull base image ${image}" exit 1 fi done unset_proxy echo "Build will be executed with network isolation" fi if [ -n "${TARGET_STAGE}" ]; then BUILDAH_ARGS+=("--target=${TARGET_STAGE}") fi BUILDAH_ARGS+=("${BUILD_ARG_FLAGS[@]}") # Necessary for newer version of buildah if the host system does not contain up to date version of container-selinux # TODO remove the option once all hosts were updated BUILDAH_ARGS+=("--security-opt=unmask=/proc/interrupts") if [ "${PRIVILEGED_NESTED}" == "true" ]; then BUILDAH_ARGS+=("--security-opt=label=disable") BUILDAH_ARGS+=("--cap-add=all") BUILDAH_ARGS+=("--device=/dev/fuse") fi if [ -n "${ADD_CAPABILITIES}" ]; then BUILDAH_ARGS+=("--cap-add=${ADD_CAPABILITIES}") fi if [ "${SQUASH}" == "true" ]; then BUILDAH_ARGS+=("--squash") fi if [ "${SKIP_UNUSED_STAGES}" != "true" ]; then BUILDAH_ARGS+=("--skip-unused-stages=false") fi if [ "${INHERIT_BASE_IMAGE_LABELS}" != "true" ]; then BUILDAH_ARGS+=("--inherit-labels=false") fi if [ -n "${BUILDAH_SOURCE_DATE_EPOCH}" ]; then BUILDAH_ARGS+=("--source-date-epoch=${BUILDAH_SOURCE_DATE_EPOCH}") if [ "${BUILDAH_REWRITE_TIMESTAMP}" = "true" ]; then BUILDAH_ARGS+=("--rewrite-timestamp") fi if [ -n "$BUILD_TIMESTAMP" ]; then echo "ERROR: cannot use both BUILD_TIMESTAMP and SOURCE_DATE_EPOCH" exit 1 fi # but do set it so that we get all the labels/annotations associated with it BUILD_TIMESTAMP="$BUILDAH_SOURCE_DATE_EPOCH" fi if [ "${BUILDAH_OMIT_HISTORY}" == "true" ]; then BUILDAH_ARGS+=("--omit-history") fi VOLUME_MOUNTS=() echo "[$(date --utc -Ins)] Setup prefetched" if [ -f "/var/workdir/cachi2/cachi2.env" ]; then cp -r "/var/workdir/cachi2" /tmp/ chmod -R go+rwX /tmp/cachi2 VOLUME_MOUNTS+=(--volume /tmp/cachi2:/cachi2) # Read in the whole file (https://unix.stackexchange.com/questions/533277), then # for each RUN ... line insert the cachi2.env command *after* any options like --mount sed -E -i \ -e 'H;1h;$!d;x' \ -e 's@^\s*(run((\s|\\\n)+-\S+)*(\s|\\\n)+)@\1. /cachi2/cachi2.env \&\& \\\n @igM' \ "$dockerfile_copy" echo "Prefetched content will be made available" prefetched_repo_for_my_arch="/tmp/cachi2/output/deps/rpm/$(uname -m)/repos.d/cachi2.repo" if [ -f "$prefetched_repo_for_my_arch" ]; then echo "Adding $prefetched_repo_for_my_arch to $YUM_REPOS_D_FETCHED" mkdir -p "$YUM_REPOS_D_FETCHED" if [ ! -f "${YUM_REPOS_D_FETCHED}/cachi2.repo" ]; then cp "$prefetched_repo_for_my_arch" "$YUM_REPOS_D_FETCHED" fi fi fi # if yum repofiles stored in git, copy them to mount point outside the source dir if [ -d "${SOURCE_CODE_DIR}/${YUM_REPOS_D_SRC}" ]; then mkdir -p "${YUM_REPOS_D_FETCHED}" cp -r "${SOURCE_CODE_DIR}/${YUM_REPOS_D_SRC}"/* "${YUM_REPOS_D_FETCHED}" fi # if anything in the repofiles mount point (either fetched or from git), mount it if [ -d "${YUM_REPOS_D_FETCHED}" ]; then chmod -R go+rwX "${YUM_REPOS_D_FETCHED}" mount_point=$(realpath "${YUM_REPOS_D_FETCHED}") VOLUME_MOUNTS+=(--volume "${mount_point}:${YUM_REPOS_D_TARGET}") fi DEFAULT_LABELS=( "--label" "architecture=$(uname -m)" "--label" "vcs-type=git" ) if [ -n "$COMMIT_SHA" ]; then DEFAULT_LABELS+=("--label" "vcs-ref=${COMMIT_SHA}" "--label" "org.opencontainers.image.revision=${COMMIT_SHA}") ANNOTATIONS+=("--annotation" "org.opencontainers.image.revision=${COMMIT_SHA}") fi if [ -n "$SOURCE_URL" ]; then DEFAULT_LABELS+=("--label" "org.opencontainers.image.source=${SOURCE_URL}") ANNOTATIONS+=("--annotation" "org.opencontainers.image.source=${SOURCE_URL}") fi [ -n "$IMAGE_EXPIRES_AFTER" ] && DEFAULT_LABELS+=("--label" "quay.expires-after=$IMAGE_EXPIRES_AFTER") BUILD_TIMESTAMP_RFC3339="" if [ -n "$BUILD_TIMESTAMP" ]; then BUILD_TIMESTAMP_RFC3339=$(date -u -d "@$BUILD_TIMESTAMP" +'%Y-%m-%dT%H:%M:%SZ') else BUILD_TIMESTAMP_RFC3339=$(date -u +'%Y-%m-%dT%H:%M:%SZ') fi DEFAULT_LABELS+=("--label" "build-date=${BUILD_TIMESTAMP_RFC3339}") DEFAULT_LABELS+=("--label" "org.opencontainers.image.created=${BUILD_TIMESTAMP_RFC3339}") ANNOTATIONS+=("--annotation" "org.opencontainers.image.created=${BUILD_TIMESTAMP_RFC3339}") label_pairs=() # If INHERIT_BASE_IMAGE_LABELS is true, get the labels from the final base image only touch base_images_labels.json if [[ "$INHERIT_BASE_IMAGE_LABELS" == "true" ]] && [[ -n "$BASE_IMAGES" ]]; then FINAL_BASE_IMAGE=$( # Get the base image of the final stage # The final stage can refer to a previous `FROM xxx AS yyy` stage, for example 'FROM bar AS foo; ... ; FROM foo; ...' # Define a function that keeps nesting recursively into the parent stages until it finds the original base image # Run the find_root_stage() function on the final stage # If the final stage is scratch or oci-archive, return empty jq -r '.Stages as $all_stages | def find_root_stage($stage): if $stage.From.Stage then find_root_stage($all_stages[$stage.From.Stage.Index]) else $stage end; find_root_stage(.Stages[-1]) | if .From.Scratch or (.BaseName | test("^oci-archive:")) then empty else .BaseName end' /shared/parsed_dockerfile.json | tr -d '"' | tr -d "'" ) if [[ -n "$FINAL_BASE_IMAGE" ]]; then set_proxy buildah pull "$FINAL_BASE_IMAGE" >/dev/null$() unset_proxy buildah inspect "$FINAL_BASE_IMAGE" | jq '.OCIv1.config.Labels' >"base_images_labels.json" fi fi # Concatenate defaults and explicit labels. If a label appears twice, the last one wins. LABELS=("${DEFAULT_LABELS[@]}" "${LABELS[@]}") # Get all the default and explicit labels so that they can be written into labels.json for label in "${LABELS[@]}"; do if [[ "$label" != "--label" ]]; then label_pairs+=("$label") fi done # Labels that we explicitly add to the image label_pairs+=("org.opencontainers.image.created=${BUILD_TIMESTAMP_RFC3339}") label_pairs+=("io.buildah.version=$(buildah version --json | jq -r '.version')") while IFS= read -r label; do label_pairs+=("$label") done < <(jq -r '.Stages[].Commands[] | select(.Name == "LABEL") | .Labels[] | "\(.Key)=\(.Value)"' /shared/parsed_dockerfile.json | sed 's/"//g') printf '%s\n' "${label_pairs[@]}" | jq -Rn ' [ inputs | select(length>0) ] | map( split("=") | {(.[0]): (.[1] // "")} ) | add' >"image_labels.json" jq -s '(.[0] // {}) * (.[1] // {})' "base_images_labels.json" "image_labels.json" >"$SOURCE_CODE_DIR/$CONTEXT/labels.json" jq '.' "$SOURCE_CODE_DIR/$CONTEXT/labels.json" if [ "${SKIP_INJECTIONS}" = "false" ]; then echo "" >>"$dockerfile_copy" # Always write labels.json to the new standard location echo 'COPY labels.json /usr/share/buildinfo/labels.json' >>"$dockerfile_copy" # Conditionally write to the old location for backward compatibility if [ "${ICM_KEEP_COMPAT_LOCATION}" = "true" ]; then echo 'COPY labels.json /root/buildinfo/labels.json' >>"$dockerfile_copy" fi fi # Make sure our labels.json file isn't filtered out containerignore="" if [ -f "$SOURCE_CODE_DIR/$CONTEXT/.containerignore" ]; then containerignore="$SOURCE_CODE_DIR/$CONTEXT/.containerignore" elif [ -f "$SOURCE_CODE_DIR/$CONTEXT/.dockerignore" ]; then containerignore="$SOURCE_CODE_DIR/$CONTEXT/.dockerignore" fi if [ -n "$containerignore" ]; then ignorefile_copy=$(mktemp --tmpdir "$(basename "$containerignore").XXXXXX") cp "$containerignore" "$ignorefile_copy" { echo "" echo "!/labels.json" echo "!/content-sets.json" } >>"$ignorefile_copy" BUILDAH_ARGS+=(--ignorefile "$ignorefile_copy") fi echo "[$(date --utc -Ins)] Register sub-man" ACTIVATION_KEY_PATH="/activation-key" ENTITLEMENT_PATH="/entitlement" # 0. if hermetic=true, skip all subscription related stuff # 1. do not enable activation key and entitlement at same time. If both vars are provided, prefer activation key. # 2. Activation-keys will be used when the key 'org' exists in the activation key secret. # 3. try to pre-register and mount files to the correct location so that users do no need to modify Dockerfiles. # 3. If the Dockerfile contains the string "subcription-manager register", add the activation-keys volume # to buildah but don't pre-register for backwards compatibility. Mount an empty directory on # shared emptydir volume to "/etc/pki/entitlement" to prevent certificates from being included if [ "${HERMETIC}" != "true" ] && [ -e /activation-key/org ]; then cp -r --preserve=mode "$ACTIVATION_KEY_PATH" /tmp/activation-key mkdir -p /shared/rhsm/etc/pki/entitlement mkdir -p /shared/rhsm/etc/pki/consumer VOLUME_MOUNTS+=(-v /tmp/activation-key:/activation-key -v /shared/rhsm/etc/pki/entitlement:/etc/pki/entitlement:Z -v /shared/rhsm/etc/pki/consumer:/etc/pki/consumer:Z) echo "Adding activation key to the build" if ! grep -E "^[^#]*subscription-manager.[^#]*register" "$dockerfile_path"; then # user is not running registration in the Containerfile: pre-register. echo "Pre-registering with subscription manager." export RETRY_MAX_TRIES=6 if ! retry subscription-manager register --org "$(cat /tmp/activation-key/org)" --activationkey "$(cat /tmp/activation-key/activationkey)"; then echo "Subscription-manager register failed" exit 1 fi unset RETRY_MAX_TRIES trap 'subscription-manager unregister || true' EXIT # copy generated certificates to /shared volume cp /etc/pki/entitlement/*.pem /shared/rhsm/etc/pki/entitlement cp /etc/pki/consumer/*.pem /shared/rhsm/etc/pki/consumer # and then mount get /etc/rhsm/ca/redhat-uep.pem into /run/secrets/rhsm/ca VOLUME_MOUNTS+=(--volume /etc/rhsm/ca/redhat-uep.pem:/etc/rhsm/ca/redhat-uep.pem:Z) fi elif [ "${HERMETIC}" != "true" ] && find /entitlement -name "*.pem" >>null; then cp -r --preserve=mode "$ENTITLEMENT_PATH" /tmp/entitlement VOLUME_MOUNTS+=(--volume /tmp/entitlement:/etc/pki/entitlement) echo "Adding the entitlement to the build" fi if [ -n "$WORKINGDIR_MOUNT" ]; then if [[ "$WORKINGDIR_MOUNT" == *:* ]]; then echo "WORKINGDIR_MOUNT contains ':'" >&2 echo "Refusing to proceed in case this is an attempt to set unexpected mount options." >&2 exit 1 fi # ${SOURCE_CODE_DIR}/${CONTEXT} will be the $PWD when we call 'buildah build' # (we set the workdir using 'unshare -w') context_dir=$(realpath "${SOURCE_CODE_DIR}/${CONTEXT}") VOLUME_MOUNTS+=(--volume "$context_dir:${WORKINGDIR_MOUNT}") fi if [ -n "${ADDITIONAL_VOLUME_MOUNTS-}" ]; then # ADDITIONAL_VOLUME_MOUNTS allows to specify more volumes for the build. # Instrumented builds (SAST) use this step as their base and add some other tools. while read -r volume_mount; do VOLUME_MOUNTS+=("--volume=$volume_mount") done <<<"$ADDITIONAL_VOLUME_MOUNTS" fi echo "[$(date --utc -Ins)] Add secrets" ADDITIONAL_SECRET_PATH="/additional-secret" ADDITIONAL_SECRET_TMP="/tmp/additional-secret" if [ -d "$ADDITIONAL_SECRET_PATH" ]; then cp -r --preserve=mode -L "$ADDITIONAL_SECRET_PATH" $ADDITIONAL_SECRET_TMP while read -r filename; do echo "Adding the secret ${ADDITIONAL_SECRET}/${filename} to the build, available at /run/secrets/${ADDITIONAL_SECRET}/${filename}" BUILDAH_ARGS+=("--secret=id=${ADDITIONAL_SECRET}/${filename},src=$ADDITIONAL_SECRET_TMP/${filename}") done < <(find $ADDITIONAL_SECRET_TMP -maxdepth 1 -type f -exec basename {} \;) fi # Prevent ShellCheck from giving a warning because 'image' is defined and 'IMAGE' is not. declare IMAGE buildah_cmd_array=( buildah build "${VOLUME_MOUNTS[@]}" "${BUILDAH_ARGS[@]}" "${LABELS[@]}" "${ANNOTATIONS[@]}" --tls-verify="$TLSVERIFY" --no-cache --ulimit nofile=4096:4096 --http-proxy=false -f "$dockerfile_copy" -t "$IMAGE" . ) buildah_cmd=$(printf "%q " "${buildah_cmd_array[@]}") if [ "${HERMETIC}" == "true" ]; then # enabling loopback adapter enables Bazel builds to work in hermetic mode. command="ip link set lo up && $buildah_cmd" else command="$buildah_cmd" fi # disable host subcription manager integration find /usr/share/rhel/secrets -type l -exec unlink {} \; set_proxy echo "[$(date --utc -Ins)] Run buildah build" echo "[$(date --utc -Ins)] ${command}" unshare -Uf "${UNSHARE_ARGS[@]}" --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 -w "${SOURCE_CODE_DIR}/$CONTEXT" --mount -- sh -c "$command" unset_proxy echo "[$(date --utc -Ins)] Add metadata" # Save the SBOM produced in prefetch so it can be merged into the final SBOM later if [ -f "/tmp/cachi2/output/bom.json" ]; then echo "Making copy of sbom-prefetch.json" cp /tmp/cachi2/output/bom.json ./sbom-prefetch.json fi touch /shared/base_images_digests echo "Recording base image digests used" for image in $BASE_IMAGES; do # Get the image pullspec and filter out a tag if it is not set # Use head -n 1 to ensure we only get one result even if multiple images match the filter base_image_digest=$(buildah images --format '{{ .Name }}{{ if ne .Tag "" }}:{{ .Tag }}{{ end }}@{{ .Digest }}' --filter reference="$image" | head -n 1) # In some cases, there might be BASE_IMAGES, but not any associated digest. This happens # if buildah did not use that particular image during build because it was skipped if [ -n "$base_image_digest" ]; then echo "$image $base_image_digest" | tee -a /shared/base_images_digests fi done image_name=$(echo "${IMAGE##*/}" | tr ':' '-') buildah push "$IMAGE" oci:"/shared/$image_name.oci" echo "/shared/$image_name.oci" >/shared/container_path echo "[$(date --utc -Ins)] End build" buildah push "$IMAGE" "oci:konflux-final-image:$IMAGE" echo "[$(date --utc -Ins)] End push remote" REMOTESSHEOF chmod +x scripts/script-build.sh PODMAN_NVIDIA_ARGS=() if [[ "$PLATFORM" == "linux-g"* ]]; then PODMAN_NVIDIA_ARGS+=("--device=nvidia.com/gpu=all" "--security-opt=label=disable") fi if ! [[ $IS_LOCALHOST ]]; then PRIVILEGED_NESTED_FLAGS=() if [[ "${PRIVILEGED_NESTED}" == "true" ]]; then # This is a workaround for building bootc images because the cache filesystem (/var/tmp/ on the host) must be a real filesystem that supports setting SELinux security attributes. # https://github.com/coreos/rpm-ostree/discussions/4648 # shellcheck disable=SC2086 ssh $SSH_ARGS "$SSH_HOST" mkdir -p "${BUILD_DIR@Q}/var/tmp" PRIVILEGED_NESTED_FLAGS=(--privileged --mount "type=bind,source=$BUILD_DIR/var/tmp,target=/var/tmp,relabel=shared") fi rsync -ra scripts "$SSH_HOST:$BUILD_DIR" echo "[$(date --utc -Ins)] Build via ssh" # shellcheck disable=SC2086 # Please note: all variables below the first ssh line must be quoted with ${var@Q}! # See https://stackoverflow.com/questions/6592376/prevent-ssh-from-breaking-up-shell-script-parameters ssh $SSH_ARGS "$SSH_HOST" $PORT_FORWARD podman run $PODMAN_PORT_FORWARD \ --tmpfs /run/secrets \ -e ACTIVATION_KEY="${ACTIVATION_KEY@Q}" \ -e ADDITIONAL_SECRET="${ADDITIONAL_SECRET@Q}" \ -e ADD_CAPABILITIES="${ADD_CAPABILITIES@Q}" \ -e ANNOTATIONS_FILE="${ANNOTATIONS_FILE@Q}" \ -e BUILD_ARGS_FILE="${BUILD_ARGS_FILE@Q}" \ -e BUILD_TIMESTAMP="${BUILD_TIMESTAMP@Q}" \ -e CONTEXT="${CONTEXT@Q}" \ -e CONTEXTUALIZE_SBOM="${CONTEXTUALIZE_SBOM@Q}" \ -e ENTITLEMENT_SECRET="${ENTITLEMENT_SECRET@Q}" \ -e HERMETIC="${HERMETIC@Q}" \ -e IMAGE="${IMAGE@Q}" \ -e IMAGE_EXPIRES_AFTER="${IMAGE_EXPIRES_AFTER@Q}" \ -e INHERIT_BASE_IMAGE_LABELS="${INHERIT_BASE_IMAGE_LABELS@Q}" \ -e PRIVILEGED_NESTED="${PRIVILEGED_NESTED@Q}" \ -e SBOM_SKIP_VALIDATION="${SBOM_SKIP_VALIDATION@Q}" \ -e SBOM_SOURCE_SCAN_ENABLED="${SBOM_SOURCE_SCAN_ENABLED@Q}" \ -e SBOM_SYFT_SELECT_CATALOGERS="${SBOM_SYFT_SELECT_CATALOGERS@Q}" \ -e SBOM_TYPE="${SBOM_TYPE@Q}" \ -e SKIP_INJECTIONS="${SKIP_INJECTIONS@Q}" \ -e SKIP_SBOM_GENERATION="${SKIP_SBOM_GENERATION@Q}" \ -e SKIP_UNUSED_STAGES="${SKIP_UNUSED_STAGES@Q}" \ -e SOURCE_CODE_DIR="${SOURCE_CODE_DIR@Q}" \ -e SQUASH="${SQUASH@Q}" \ -e STORAGE_DRIVER="${STORAGE_DRIVER@Q}" \ -e TARGET_STAGE="${TARGET_STAGE@Q}" \ -e TLSVERIFY="${TLSVERIFY@Q}" \ -e WORKINGDIR_MOUNT="${WORKINGDIR_MOUNT@Q}" \ -e YUM_REPOS_D_FETCHED="${YUM_REPOS_D_FETCHED@Q}" \ -e YUM_REPOS_D_SRC="${YUM_REPOS_D_SRC@Q}" \ -e YUM_REPOS_D_TARGET="${YUM_REPOS_D_TARGET@Q}" \ -e COMMIT_SHA="${COMMIT_SHA@Q}" \ -e SOURCE_URL="${SOURCE_URL@Q}" \ -e DOCKERFILE="${DOCKERFILE@Q}" \ -e BUILDAH_HTTP_PROXY="${BUILDAH_HTTP_PROXY@Q}" \ -e BUILDAH_NO_PROXY="${BUILDAH_NO_PROXY@Q}" \ -e ICM_KEEP_COMPAT_LOCATION="${ICM_KEEP_COMPAT_LOCATION@Q}" \ -e BUILDAH_OMIT_HISTORY="${BUILDAH_OMIT_HISTORY@Q}" \ -e BUILDAH_SOURCE_DATE_EPOCH="${BUILDAH_SOURCE_DATE_EPOCH@Q}" \ -e BUILDAH_REWRITE_TIMESTAMP="${BUILDAH_REWRITE_TIMESTAMP@Q}" \ -v "${BUILD_DIR@Q}/volumes/shared:/shared:Z" \ -v "${BUILD_DIR@Q}/volumes/workdir:/var/workdir:Z" \ -v "${BUILD_DIR@Q}/volumes/etc-pki-entitlement:/entitlement:Z" \ -v "${BUILD_DIR@Q}/volumes/activation-key:/activation-key:Z" \ -v "${BUILD_DIR@Q}/volumes/additional-secret:/additional-secret:Z" \ -v "${BUILD_DIR@Q}/volumes/trusted-ca:/mnt/trusted-ca:Z" \ -v "${BUILD_DIR@Q}/volumes/proxy-ca-bundle:/mnt/proxy-ca-bundle:Z" \ -v "${BUILD_DIR@Q}/.docker/:/root/.docker:Z" \ -v "${BUILD_DIR@Q}/usr/bin/retry:/usr/bin/retry:Z" \ -v "${BUILD_DIR@Q}/results/:/tekton/results:Z" \ -v "${BUILD_DIR@Q}/scripts:/scripts:Z" \ "${PRIVILEGED_NESTED_FLAGS[@]@Q}" \ --user=0 "${PODMAN_NVIDIA_ARGS[@]@Q}" --rm "${BUILDER_IMAGE@Q}" /scripts/script-build.sh "${@@Q}" echo "[$(date --utc -Ins)] Rsync back" rsync -razW --stats "$SSH_HOST:$BUILD_DIR/volumes/shared/" /shared/ rsync -razW --stats "$SSH_HOST:$BUILD_DIR/volumes/workdir/" /var/workdir/ rsync -razW --stats "$SSH_HOST:$BUILD_DIR/results/" "/tekton/results/" echo "[$(date --utc -Ins)] Buildah pull" buildah pull "oci:konflux-final-image:$IMAGE" else bash scripts/script-build.sh "$@" fi [2026-04-16T19:38:58,768994547+00:00] Validate context path [2026-04-16T19:38:58,773487768+00:00] Update CA trust [2026-04-16T19:38:58,775122603+00:00] Using mounted CA bundle: /mnt/trusted-ca/ca-bundle.crt '/mnt/trusted-ca/ca-bundle.crt' -> '/etc/pki/ca-trust/source/anchors/ca-bundle.crt' [2026-04-16T19:39:01,454132354+00:00] Prepare Dockerfile Checking if /var/workdir/cachi2/output/bom.json exists. Could not find prefetched sbom. No content_sets found for ICM [2026-04-16T19:39:01,462272327+00:00] Prepare system (architecture: x86_64) [2026-04-16T19:39:02,933743991+00:00] Setup prefetched Trying to pull registry.access.redhat.com/ubi9/python-311:9.7... Getting image source signatures Checking if image destination supports signatures Copying blob sha256:995b2aace9e8a18678f99a60d194ed2432e8e478c7d02a7be75ccf09cd3441ed Copying blob sha256:dc4e9513f9be866e647cd750a79990120fc009db6a8079c96746f7a7016dabf4 Copying blob sha256:ef470f96121612029eab30ae111ae34e856527157345b0f7d71dc5aa8ad5949a Copying blob sha256:ba373b90b6f2d2618a2bc1620c38d599a9c0be5539a04db9669652030ee174a1 Copying config sha256:528f0598d4e0d3ebb4235648d8f6ef726ecb8ac2a6fabe80f3ea7be257c09f7e Writing manifest to image destination Storing signatures [2026-04-16T19:39:12,562470471+00:00] Unsetting proxy { "architecture": "x86_64", "build-date": "2026-04-16T19:39:02Z", "com.redhat.component": "python-311-container", "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", "cpe": "cpe:/a:redhat:enterprise_linux:9::appstream", "description": "Python 3.11 available as container is a base platform for building and running various Python 3.11 applications and frameworks. Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.", "distribution-scope": "public", "io.buildah.version": "1.41.4", "io.buildpacks.stack.id": "com.redhat.stacks.ubi9-python-311", "io.k8s.description": "Python 3.11 available as container is a base platform for building and running various Python 3.11 applications and frameworks. Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.", "io.k8s.display-name": "Python 3.11", "io.openshift.expose-services": "8080:http", "io.openshift.s2i.scripts-url": "image:///usr/libexec/s2i", "io.openshift.tags": "builder,python,python311,python-311,rh-python311", "io.s2i.scripts-url": "image:///usr/libexec/s2i", "maintainer": "SoftwareCollections.org ", "name": "ubi9/python-311", "org.opencontainers.image.created": "2026-04-16T19:39:02Z", "org.opencontainers.image.revision": "5307355ab74e23f79abb176e648f3fb6f6c9d32c", "release": "1776202730", "summary": "Platform for building and running Python 3.11 applications", "url": "https://catalog.redhat.com/en/search?searchType=containers", "usage": "s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.11/test/setup-test-app/ ubi9/python-311 python-sample-app", "vcs-ref": "5307355ab74e23f79abb176e648f3fb6f6c9d32c", "vcs-type": "git", "vendor": "Red Hat, Inc.", "version": "1", "git.url": "https://github.com/bartoszmajsak/kserve", "git.commit": "5307355ab74e23f79abb176e648f3fb6f6c9d32c" } [2026-04-16T19:39:12,630878945+00:00] Register sub-man Adding activation key to the build Pre-registering with subscription manager. Executing: subscription-manager register --org 11009103 --activationkey b5fd5ca4-06d5-4b45-86e6-e78776aaa8c1 The system has been registered with ID: 23320ff0-5165-4c7c-9147-204000a25b43 The registered system name is: kserve-group-test-ldcnp-build-sklearn-serving-runtime-pod [2026-04-16T19:39:16,748680212+00:00] Add secrets [2026-04-16T19:39:16,761612284+00:00] Run buildah build [2026-04-16T19:39:16,764035504+00:00] buildah build -v /tmp/activation-key:/activation-key -v /shared/rhsm/etc/pki/entitlement:/etc/pki/entitlement:Z -v /shared/rhsm/etc/pki/consumer:/etc/pki/consumer:Z --volume /etc/rhsm/ca/redhat-uep.pem:/etc/rhsm/ca/redhat-uep.pem:Z --security-opt=unmask=/proc/interrupts --ignorefile /tmp/.dockerignore.4iuTup --label architecture=x86_64 --label vcs-type=git --label vcs-ref=5307355ab74e23f79abb176e648f3fb6f6c9d32c --label org.opencontainers.image.revision=5307355ab74e23f79abb176e648f3fb6f6c9d32c --label build-date=2026-04-16T19:39:02Z --label org.opencontainers.image.created=2026-04-16T19:39:02Z --label git.url=https://github.com/bartoszmajsak/kserve --label git.commit=5307355ab74e23f79abb176e648f3fb6f6c9d32c --annotation org.opencontainers.image.revision=5307355ab74e23f79abb176e648f3fb6f6c9d32c --annotation org.opencontainers.image.created=2026-04-16T19:39:02Z --tls-verify=true --no-cache --ulimit nofile=4096:4096 --http-proxy=false -f /tmp/sklearn.Dockerfile.SbT6jL -t quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 . [1/2] STEP 1/24: FROM registry.access.redhat.com/ubi9/python-311:9.7 AS builder [1/2] STEP 2/24: WORKDIR / [1/2] STEP 3/24: USER 0 [1/2] STEP 4/24: RUN dnf install -y gcc gcc-c++ make python3.11-devel && dnf clean all Updating Subscription Management repositories. This system has release set to 9.6 and it receives updates only for this release. Red Hat Enterprise Linux 9 for x86_64 - BaseOS 127 MB/s | 87 MB 00:00 Red Hat Enterprise Linux 9 for x86_64 - AppStre 130 MB/s | 73 MB 00:00 Red Hat Universal Base Image 9 (RPMs) - BaseOS 3.5 MB/s | 533 kB 00:00 Red Hat Universal Base Image 9 (RPMs) - AppStre 28 MB/s | 2.6 MB 00:00 Red Hat Universal Base Image 9 (RPMs) - CodeRea 3.3 MB/s | 288 kB 00:00 Package gcc-11.5.0-11.el9.x86_64 is already installed. Package gcc-c++-11.5.0-11.el9.x86_64 is already installed. Package make-1:4.3-8.el9.x86_64 is already installed. Package python3.11-devel-3.11.13-5.2.el9_7.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! Updating Subscription Management repositories. This system has release set to 9.6 and it receives updates only for this release. 43 files removed [1/2] STEP 5/24: RUN curl -LsSf https://astral.sh/uv/install.sh | sh && ln -s /root/.local/bin/uv /usr/local/bin/uv downloading uv 0.11.7 x86_64-unknown-linux-gnu installing to /opt/app-root/src/.local/bin uv uvx everything's installed! To add $HOME/.local/bin to your PATH, either restart your shell or run: source $HOME/.local/bin/env (sh, bash, zsh) source $HOME/.local/bin/env.fish (fish) [1/2] STEP 6/24: ARG VENV_PATH [1/2] STEP 7/24: ENV VIRTUAL_ENV=${VENV_PATH} [1/2] STEP 8/24: RUN uv venv $VIRTUAL_ENV Using CPython 3.9.25 interpreter at: /usr/bin/python3 Creating virtual environment at: /prod_venv [1/2] STEP 9/24: ENV PATH="$VIRTUAL_ENV/bin:$PATH" [1/2] STEP 10/24: COPY storage/pyproject.toml storage/uv.lock storage/ [1/2] STEP 11/24: COPY kserve/pyproject.toml kserve/uv.lock kserve/ [1/2] STEP 12/24: RUN cd kserve && uv sync --active --no-cache Using CPython 3.11.13 interpreter at: /usr/bin/python3.11 Removed virtual environment at: /prod_venv Creating virtual environment at: /prod_venv Resolved 263 packages in 1ms Building kserve @ file:///kserve Downloading cryptography (4.3MiB) Downloading pydantic-core (2.0MiB) Downloading grpcio-tools (2.5MiB) Downloading kubernetes (1.9MiB) Downloading aiohttp (1.7MiB) Downloading pandas (12.5MiB) Downloading setuptools (1.2MiB) Downloading numpy (15.7MiB) Downloading grpcio (6.4MiB) Downloading black (1.6MiB) Downloading uvloop (3.8MiB) Downloaded aiohttp Downloaded black Downloaded pydantic-core Downloaded grpcio-tools Downloaded setuptools Downloaded uvloop Downloaded grpcio Downloaded cryptography Downloaded kubernetes Downloaded numpy Downloaded pandas Built kserve @ file:///kserve Prepared 74 packages in 1.62s Installed 74 packages in 1.68s + aiohappyeyeballs==2.6.1 + aiohttp==3.13.3 + aiosignal==1.4.0 + annotated-doc==0.0.4 + annotated-types==0.7.0 + anyio==4.9.0 + attrs==25.3.0 + black==24.3.0 + cachetools==5.5.2 + certifi==2025.1.31 + cffi==2.0.0 + charset-normalizer==3.4.1 + click==8.1.8 + cloudevents==1.11.0 + colorama==0.4.6 + cryptography==46.0.5 + deprecation==2.1.0 + durationpy==0.9 + fastapi==0.121.3 + frozenlist==1.5.0 + google-auth==2.39.0 + grpc-interceptor==0.15.4 + grpcio==1.78.1 + grpcio-tools==1.78.1 + h11==0.16.0 + httpcore==1.0.9 + httptools==0.6.4 + httpx==0.27.2 + idna==3.10 + kserve==0.17.0 (from file:///kserve) + kubernetes==32.0.1 + multidict==6.4.3 + mypy-extensions==1.0.0 + numpy==2.2.4 + oauthlib==3.2.2 + orjson==3.10.16 + packaging==24.2 + pandas==2.2.3 + pathspec==0.12.1 + platformdirs==4.3.7 + prometheus-client==0.21.1 + propcache==0.3.1 + protobuf==6.33.5 + psutil==5.9.8 + pyasn1==0.6.1 + pyasn1-modules==0.4.2 + pycparser==2.22 + pydantic==2.12.4 + pydantic-core==2.41.5 + pyjwt==2.12.1 + python-dateutil==2.9.0.post0 + python-dotenv==1.1.0 + python-multipart==0.0.22 + pytz==2025.2 + pyyaml==6.0.2 + requests==2.32.3 + requests-oauthlib==2.0.0 + rsa==4.9.1 + setuptools==78.1.0 + six==1.17.0 + sniffio==1.3.1 + starlette==0.49.1 + tabulate==0.9.0 + timing-asgi==0.3.1 + typing-extensions==4.15.0 + typing-inspection==0.4.2 + tzdata==2025.2 + urllib3==2.6.2 + uvicorn==0.34.1 + uvloop==0.21.0 + watchfiles==1.0.5 + websocket-client==1.8.0 + websockets==15.0.1 + yarl==1.20.0 [1/2] STEP 13/24: COPY kserve kserve [1/2] STEP 14/24: RUN cd kserve && uv sync --active --no-cache Resolved 263 packages in 1ms Building kserve @ file:///kserve Built kserve @ file:///kserve Prepared 1 package in 1.10s Uninstalled 1 package in 0.42ms Installed 1 package in 4ms ~ kserve==0.17.0 (from file:///kserve) [1/2] STEP 15/24: COPY storage storage [1/2] STEP 16/24: RUN cd storage && uv pip install . --no-cache Using Python 3.11.13 environment at: /prod_venv Resolved 66 packages in 321ms Building kserve-storage @ file:///storage Downloading dulwich (1.4MiB) Downloading hf-xet (4.0MiB) Downloading botocore (14.2MiB) Downloading pygments (1.2MiB) Downloaded hf-xet Downloaded dulwich Downloaded pygments Downloaded botocore Built kserve-storage @ file:///storage Prepared 32 packages in 1.11s Uninstalled 1 package in 0.73ms Installed 32 packages in 2.08s + azure-core==1.39.0 + azure-identity==1.25.3 + azure-storage-blob==12.28.0 + azure-storage-file-share==12.24.0 + boto3==1.42.89 + botocore==1.42.89 - click==8.1.8 + click==8.3.2 + dulwich==1.1.0 + filelock==3.28.0 + fsspec==2026.3.0 + google-api-core==2.30.3 + google-cloud-core==2.5.1 + google-cloud-storage==2.19.0 + google-crc32c==1.8.0 + google-resumable-media==2.8.2 + googleapis-common-protos==1.74.0 + hf-xet==1.4.3 + huggingface-hub==1.11.0 + isodate==0.7.2 + jmespath==1.1.0 + kserve-storage==0.17.0 (from file:///storage) + markdown-it-py==4.0.0 + mdurl==0.1.2 + msal==1.36.0 + msal-extensions==1.3.1 + proto-plus==1.27.2 + pygments==2.20.0 + rich==15.0.0 + s3transfer==0.16.0 + shellingham==1.5.4 + tqdm==4.67.3 + typer==0.24.1 warning: The package `huggingface-hub==1.11.0` does not have an extra named `hf-transfer` [1/2] STEP 17/24: COPY sklearnserver/pyproject.toml sklearnserver/uv.lock sklearnserver/ [1/2] STEP 18/24: RUN cd sklearnserver && uv sync --active --no-cache Resolved 115 packages in 1ms Building kserve @ file:///kserve Building kserve-storage @ file:///storage Downloading setuptools (1.1MiB) Downloading hf-transfer (3.4MiB) Downloading scikit-learn (12.7MiB) Downloading grpcio (5.9MiB) Downloading dulwich (1.4MiB) Downloading grpcio-tools (2.5MiB) Downloading pydantic-core (1.9MiB) Downloading scipy (35.9MiB) Downloading botocore (12.9MiB) Downloading hf-xet (4.6MiB) Downloaded pydantic-core Downloaded grpcio-tools Downloaded dulwich Downloaded hf-transfer Downloaded hf-xet Downloaded grpcio Downloaded setuptools Downloaded scikit-learn Downloaded scipy Downloaded botocore Built kserve-storage @ file:///storage Built kserve @ file:///kserve Prepared 41 packages in 1.80s Uninstalled 42 packages in 249ms Installed 41 packages in 2.09s - azure-core==1.39.0 + azure-core==1.33.0 - azure-identity==1.25.3 + azure-identity==1.21.0 - azure-storage-blob==12.28.0 + azure-storage-blob==12.25.1 - azure-storage-file-share==12.24.0 + azure-storage-file-share==12.21.0 - boto3==1.42.89 + boto3==1.37.34 - botocore==1.42.89 + botocore==1.37.34 - click==8.3.2 + click==8.1.8 - dulwich==1.1.0 + dulwich==1.0.0 - filelock==3.28.0 + filelock==3.18.0 - frozenlist==1.5.0 + frozenlist==1.7.0 - fsspec==2026.3.0 + fsspec==2025.3.2 - google-api-core==2.30.3 + google-api-core==2.24.2 - google-cloud-core==2.5.1 + google-cloud-core==2.4.3 - google-crc32c==1.8.0 + google-crc32c==1.7.1 - google-resumable-media==2.8.2 + google-resumable-media==2.7.2 - googleapis-common-protos==1.74.0 + googleapis-common-protos==1.70.0 - grpcio==1.78.1 + grpcio==1.74.0 - grpcio-tools==1.78.1 + grpcio-tools==1.74.0 + hf-transfer==0.1.9 - hf-xet==1.4.3 + hf-xet==1.1.3 - httpx==0.27.2 + httpx==0.28.1 - huggingface-hub==1.11.0 + huggingface-hub==0.32.4 - jmespath==1.1.0 + jmespath==1.0.1 + joblib==1.4.2 ~ kserve==0.17.0 (from file:///kserve) ~ kserve-storage==0.17.0 (from file:///storage) - markdown-it-py==4.0.0 - mdurl==0.1.2 - msal==1.36.0 + msal==1.32.0 - multidict==6.4.3 + multidict==6.6.4 - propcache==0.3.1 + propcache==0.3.2 - proto-plus==1.27.2 + proto-plus==1.26.1 - pydantic==2.12.4 + pydantic==2.11.3 - pydantic-core==2.41.5 + pydantic-core==2.33.1 - pygments==2.20.0 - rich==15.0.0 - s3transfer==0.16.0 + s3transfer==0.11.4 + scikit-learn==1.5.2 + scipy==1.15.2 - setuptools==78.1.0 + setuptools==80.9.0 - shellingham==1.5.4 + threadpoolctl==3.6.0 - tqdm==4.67.3 + tqdm==4.67.1 - typer==0.24.1 - typing-extensions==4.15.0 + typing-extensions==4.13.2 - typing-inspection==0.4.2 + typing-inspection==0.4.0 - yarl==1.20.0 + yarl==1.20.1 [1/2] STEP 19/24: COPY sklearnserver sklearnserver [1/2] STEP 20/24: RUN cd sklearnserver && uv sync --active --no-cache Resolved 115 packages in 1ms Checked 104 packages in 22ms [1/2] STEP 21/24: COPY pyproject.toml pyproject.toml [1/2] STEP 22/24: COPY third_party/pip-licenses.py pip-licenses.py [1/2] STEP 23/24: RUN pip install --no-cache-dir tomli Collecting tomli Downloading tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (10 kB) Downloading tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (243 kB) Installing collected packages: tomli Successfully installed tomli-2.4.1 [notice] A new release of pip is available: 24.2 -> 26.0.1 [notice] To update, run: pip install --upgrade pip [1/2] STEP 24/24: RUN mkdir -p third_party/library && python3 pip-licenses.py 2026-04-16 19:40:04,133 [INFO] {'from': 'mixed', 'format': 'plain-vertical', 'with_license_file': True, 'with_notice_file': True, 'with_urls': True, 'output_path': 'third_party/library', 'ignore_packages': ['nvidia-cublas-cu12', 'nvidia-cuda-cupti-cu12', 'nvidia-cuda-nvrtc-cu12', 'nvidia-cuda-runtime-cu12', 'nvidia-cudnn-cu12', 'nvidia-cufft-cu12', 'nvidia-cufile-cu12', 'nvidia-curand-cu12', 'nvidia-cusolver-cu12', 'nvidia-cusparse-cu12', 'nvidia-nccl-cu12', 'nvidia-nvjitlink-cu12', 'nvidia-nvtx-cu12', 'nvidia-cutlass-dsl', 'nvidia-cutlass-dsl-libs-base', 'nvidia-cusparselt-cu12', 'nvidia-cudnn-frontend', 'nvidia-nvshmem-cu12', 'intel-openmp', 'intel-cmplr-lib-ur', 'umf', 'tcmlib'], 'allow_only': 'Apache Software License;MIT License;BSD License;Mozilla Public License 2.0 (MPL 2.0);Python Software Foundation License;CMU License (MIT-CMU);The Unlicense (Unlicense);ISC License (ISCL);GNU Lesser General Public License v2 (LGPLv2);GNU General Public License (GPL);Historical Permission Notice and Disclaimer (HPND);'} [2/2] STEP 1/18: FROM registry.access.redhat.com/ubi9/python-311:9.7 AS prod [2/2] STEP 2/18: WORKDIR / [2/2] STEP 3/18: ARG VENV_PATH [2/2] STEP 4/18: ENV VIRTUAL_ENV=${VENV_PATH} [2/2] STEP 5/18: ENV PATH="$VIRTUAL_ENV/bin:$PATH" [2/2] STEP 6/18: USER 0 [2/2] STEP 7/18: RUN useradd kserve -m -u 1000 -d /home/kserve [2/2] STEP 8/18: COPY --from=builder --chown=kserve:kserve third_party third_party [2/2] STEP 9/18: COPY --from=builder --chown=kserve:kserve $VIRTUAL_ENV $VIRTUAL_ENV [2/2] STEP 10/18: COPY --from=builder kserve kserve [2/2] STEP 11/18: COPY --from=builder storage storage [2/2] STEP 12/18: COPY --from=builder sklearnserver sklearnserver [2/2] STEP 13/18: USER 1000 [2/2] STEP 14/18: ENV PYTHONPATH=/sklearnserver [2/2] STEP 15/18: ENTRYPOINT ["python", "-m", "sklearnserver"] [2/2] STEP 16/18: COPY labels.json /usr/share/buildinfo/labels.json [2/2] STEP 17/18: COPY labels.json /root/buildinfo/labels.json [2/2] STEP 18/18: LABEL "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="5307355ab74e23f79abb176e648f3fb6f6c9d32c" "org.opencontainers.image.revision"="5307355ab74e23f79abb176e648f3fb6f6c9d32c" "build-date"="2026-04-16T19:39:02Z" "org.opencontainers.image.created"="2026-04-16T19:39:02Z" "git.url"="https://github.com/bartoszmajsak/kserve" "git.commit"="5307355ab74e23f79abb176e648f3fb6f6c9d32c" [2/2] COMMIT quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 --> bc51dba7c550 Successfully tagged quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 bc51dba7c550e15cc7aab115dc0461c8f583188586f0c72fb0c8339861321f3d [2026-04-16T19:40:24,622826681+00:00] Unsetting proxy [2026-04-16T19:40:24,624648696+00:00] Add metadata Recording base image digests used registry.access.redhat.com/ubi9/python-311:9.7 registry.access.redhat.com/ubi9/python-311:9.7@sha256:17a6df47d87bd3b13162117e04c88e2e390efa3ac7a436a9efbc0c002ea2fe5e registry.access.redhat.com/ubi9/python-311:9.7 registry.access.redhat.com/ubi9/python-311:9.7@sha256:17a6df47d87bd3b13162117e04c88e2e390efa3ac7a436a9efbc0c002ea2fe5e Getting image source signatures Copying blob sha256:4a1a00bbc5229d242738e7a02d0fdce6a4f899c1f6147895e895f6866678356b Copying blob sha256:eb14e5ae93ae3f9d30fa532f71a0026f81c4d11fce14d716aa64297272576329 Copying blob sha256:f973e9b7b27b6bcff1807d9c3d858d62e9b81fda2597547129ca04d746ef9b93 Copying blob sha256:778d69f0aae02e7827a72d083c41d8c101137d88ae68dc2d3b328d1987959ab0 Copying blob sha256:be42fc1678eb19f07c3fecded847813f95afabef3372ccf4b09b3795aa1aa694 Copying config sha256:bc51dba7c550e15cc7aab115dc0461c8f583188586f0c72fb0c8339861321f3d Writing manifest to image destination [2026-04-16T19:40:30,323909105+00:00] End build Getting image source signatures Copying blob sha256:4a1a00bbc5229d242738e7a02d0fdce6a4f899c1f6147895e895f6866678356b Copying blob sha256:be42fc1678eb19f07c3fecded847813f95afabef3372ccf4b09b3795aa1aa694 Copying blob sha256:f973e9b7b27b6bcff1807d9c3d858d62e9b81fda2597547129ca04d746ef9b93 Copying blob sha256:eb14e5ae93ae3f9d30fa532f71a0026f81c4d11fce14d716aa64297272576329 Copying blob sha256:778d69f0aae02e7827a72d083c41d8c101137d88ae68dc2d3b328d1987959ab0 Copying config sha256:bc51dba7c550e15cc7aab115dc0461c8f583188586f0c72fb0c8339861321f3d Writing manifest to image destination [2026-04-16T19:40:35,927617091+00:00] End push remote Unregistering from: subscription.rhsm.redhat.com:443/subscription System has been unregistered. echo "Build on remote host $SSH_HOST finished" echo "[$(date --utc -Ins)] Final touches" Build on remote host localhost finished [2026-04-16T19:40:36,456840701+00:00] Final touches buildah images REPOSITORY TAG IMAGE ID CREATED SIZE quay.io/opendatahub/sklearn-serving-runtime odh-pr-1412 bc51dba7c550 20 seconds ago 1.56 GB registry.access.redhat.com/ubi9/python-311 9.7 528f0598d4e0 46 hours ago 1.1 GB echo "[$(date --utc -Ins)] End remote" [2026-04-16T19:40:36,485350358+00:00] End remote [2026-04-16T19:40:36,887681003+00:00] Update CA trust INFO: Using mounted CA bundle: /mnt/trusted-ca/ca-bundle.crt '/mnt/trusted-ca/ca-bundle.crt' -> '/etc/pki/ca-trust/source/anchors/ca-bundle.crt' [2026-04-16T19:40:39,554703529+00:00] Convert image [2026-04-16T19:40:39,556228237+00:00] Push image with unique tag Pushing to quay.io/opendatahub/sklearn-serving-runtime:kserve-group-test-ldcnp-build-sklearn-serving-runtime Executing: buildah push --format=docker --retry 3 --tls-verify=true quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 docker://quay.io/opendatahub/sklearn-serving-runtime:kserve-group-test-ldcnp-build-sklearn-serving-runtime [2026-04-16T19:40:53,919537941+00:00] Push image with git revision Pushing to quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 Executing: buildah push --format=docker --retry 3 --tls-verify=true --digestfile /var/workdir/image-digest quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 docker://quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 sha256:e8dc35fb00a3c252e5b55911b73bd460ea9f22553ae6186a542c73e32abbc515quay.io/opendatahub/sklearn-serving-runtime:odh-pr-1412 [2026-04-16T19:40:54,607109102+00:00] End push [2026-04-16T19:40:55,019703900+00:00] Generate SBOM Running syft on the image Running syft on the source code [0000] WARN no explicit name and version provided for directory source, deriving artifact ID from the given path (which is not ideal) [2026-04-16T19:41:18,990335789+00:00] End sbom-syft-generate [2026-04-16T19:41:19,126739554+00:00] Prepare SBOM [2026-04-16T19:41:19,133854777+00:00] Generate SBOM with mobster Skipping SBOM validation 2026-04-16 19:41:20,190 [INFO] mobster.log: Logging level set to 20 2026-04-16 19:41:21,016 [INFO] mobster.oci: Fetching manifest for registry.access.redhat.com/ubi9/python-311@sha256:17a6df47d87bd3b13162117e04c88e2e390efa3ac7a436a9efbc0c002ea2fe5e 2026-04-16 19:41:21,471 [INFO] mobster.cmd.generate.oci_image.contextual_sbom.contextualize: Contextual workflow will be used. Parent SBOM used for contextualization: https://konflux-ci.dev/spdxdocs/quay.io/redhat-user-workloads/osci-rhel-containers-tenant/rhel-9-7/python-311-9-7@sha256:91908c2828f37fd634c8135717fc1720006d556b0fd53d1f322479e3df31815d-0681d3c1-c552-4fe0-a603-b3805c10f000 2026-04-16 19:41:21,683 [INFO] mobster.cmd.generate.oci_image.contextual_sbom.logging: {"event_type": "contextual_sbom_matching_statistics", "parent_sbom_reference": "https://konflux-ci.dev/spdxdocs/quay.io/redhat-user-workloads/osci-rhel-containers-tenant/rhel-9-7/python-311-9-7@sha256:91908c2828f37fd634c8135717fc1720006d556b0fd53d1f322479e3df31815d-0681d3c1-c552-4fe0-a603-b3805c10f000", "component_sbom_reference": "https://konflux-ci.dev/spdxdocs/quay.io/opendatahub/sklearn-serving-runtime@sha256:e8dc35fb00a3c252e5b55911b73bd460ea9f22553ae6186a542c73e32abbc515-b36b58e5-e113-447e-b4c9-d031ee85e078", "component_packages": {"total": 1294, "matched": 681, "unmatched_all": 613, "unmatched_component_only": 605, "unmatched_without_unique_id": 8}, "parent_packages": {"total": 755, "matched": 750, "unmatched_all": 5, "unmatched_removed_at_build": 5, "unmatched_without_unique_id": 0}, "match_methods": {"by_checksum": 0, "by_verification_code": 461, "by_purl": 220, "total": 681}, "match_origins": {"syft_to_syft": 681, "syft_to_hermeto": 0, "hermeto_to_syft": 0, "hermeto_to_hermeto": 0}, "duplicate_identifiers": {"checksums": {"count": 0, "details": []}, "verification_codes": {"count": 0, "details": []}, "purls": {"count": 0, "details": []}}} 2026-04-16 19:41:21,686 [INFO] mobster.cmd.generate.oci_image: Contextual SBOM workflow finished successfully. 2026-04-16 19:41:21,686 [INFO] mobster.log: Contextual workflow completed in 0.94s 2026-04-16 19:41:22,093 [INFO] mobster.main: Exiting with code 0. [2026-04-16T19:41:22,180181084+00:00] End prepare-sboms