Skip to content

Instantly share code, notes, and snippets.

View israel-hdez's full-sized avatar

Edgar Hernández israel-hdez

  • Red Hat
  • México
View GitHub Profile
@israel-hdez
israel-hdez / faster-rcnn-resnet-v1.Containerfile
Last active August 30, 2024 20:28
ODH/KServe modelcar - Race condition replication - Runtime starts before model is available
FROM busybox
# Based on ovms quick start guide
ARG MODEL_TAR_URL=https://www.kaggle.com/api/v1/models/tensorflow/faster-rcnn-resnet-v1/tensorFlow2/faster-rcnn-resnet50-v1-640x640/1/download
RUN mkdir -p /models/1; \
chmod -R 775 /models; \
wget ${MODEL_TAR_URL} -O - | tar -zx -C /models/1
@israel-hdez
israel-hdez / instructions.md
Last active September 23, 2024 15:14
InferenceGraph Workaround in ODH/KServe

Introduction

In the Open Data Hub project (ODH) KServe is provided, however not all KServe features are currently supported, because OpenShift integration is not complete yet.

The previous doesn't mean that OpenShift is not compatible with KServe (or vice-versa). You should be able to use KServe in OpenShift by following upstream instructions: https://kserve.github.io/website/latest/get_started/, but you will require to install the whole stack by yourself. In ODH one of the goals is to provide a AI platform that is well integrated with OpenShift and providing a package that is easy to install. For KServe, such integration is not finished yet.

@israel-hdez
israel-hdez / reproducer-script.sh
Created May 14, 2024 20:47
ODH/KServe blocked internal hostnames reproducer
# For this reproducer, CRC (aka OpenShift Local) was used.
# Note: This script is NOT prepared nor tested to be run at the CLI.
# Instead, commands were copied & pasted. This would be the recommended way to try.
#
# 1. Install ODH 2.11.
# 1.1 Install dependencies - OSSM operator
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:

Introduction

This guide describes the steps needed to generate a build and deploy/install the needed components that add authorization capabilities to the ODH KServe stack.

The authorization capabilities are implemented in two pull requests:

@israel-hdez
israel-hdez / kserve-sample-model-test.sh
Created November 10, 2023 05:14
KServe basic test
#!/usr/bin/env bash
# Deploy to new namespace
oc new-project kserve-test
# Create a ServingRuntime
curl -s https://raw.githubusercontent.com/opendatahub-io/kserve/master/config/runtimes/kserve-sklearnserver.yaml | \
sed 's/ClusterServingRuntime/ServingRuntime/' | \
sed "s|kserve-sklearnserver:replace|docker.io/kserve/sklearnserver:latest|" | \
oc apply -f -
@israel-hdez
israel-hdez / kserve-build-configs.yaml
Last active November 7, 2023 19:48
KServe OpenShift BuildConfigs
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: kserve-controller-bc
spec:
source:
git:
uri: https://github.com/opendatahub-io/kserve.git
ref: master
contextDir: "."
@israel-hdez
israel-hdez / Containerfile
Last active August 22, 2023 20:37
Build a container that has OpenVino and a built-in model - this is based on OpenVINO quickstart
FROM quay.io/opendatahub/openvino_model_server:2022.3-release
USER root
RUN mkdir /models && chown ovms:ovms /models
USER ovms
RUN curl --create-dirs \
https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/face-detection-retail-0004/FP32/face-detection-retail-0004.xml \
https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/face-detection-retail-0004/FP32/face-detection-retail-0004.bin \
-o /models/1/face-detection-retail-0004.xml \
@israel-hdez
israel-hdez / install-splitted-bookinfo.bash
Last active November 3, 2023 20:01
Istio multi-cluster development setup
#!/bin/bash
set -e
: ${ISTIO_DIR:="$HOME/apps/istio-1.9.0"}
ISTIOCTL=$ISTIO_DIR/bin/istioctl
: ${BOOKINFO_NS:=bookinfo}
: ${CTX1:=kukulcan}
apiVersion: apps/v1
kind: Deployment
metadata:
name: workload-a
labels:
app: workload-a
version: v1
spec:
replicas: 1
selector: