Skip to content

Commit

Permalink
Add default value for TARGETOS/TARGETARCH
Browse files Browse the repository at this point in the history
&& Update runtime/fvt manifests

Signed-off-by: jooho <jlee@redhat.com>
  • Loading branch information
Jooho committed Jun 7, 2023
1 parent a8516fc commit a16bbe3
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,5 @@ devbuild
.cache/
kustomize/
.temp_new_modelmesh_manifests
opendatahub/scripts/manifests/params.env
opendatahub/scripts/manifests/fvt/
opendatahub/scripts/manifests/runtimes/
kfctl*
bin
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
###############################################################################
ARG DEV_IMAGE
FROM --platform=$BUILDPLATFORM $DEV_IMAGE AS build
FROM ${DEV_IMAGE} AS build

# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
# don't provide "default" values (e.g. 'ARG TARGETARCH=amd64') for non-buildx environments,
# see https://github.com/docker/buildx/issues/510
ARG TARGETOS
ARG TARGETARCH
ARG TARGETOS=linux
ARG TARGETARCH=amd64

LABEL image="build"

Expand Down
18 changes: 13 additions & 5 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
###############################################################################
# Create the develop, test, and build environment
###############################################################################
FROM registry.access.redhat.com/ubi8/go-toolset:1.19
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7

# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
# don't provide "default" values (e.g. 'ARG TARGETARCH=amd64') for non-buildx environments,
# see https://github.com/docker/buildx/issues/510
ARG TARGETOS
ARG TARGETARCH
ARG TARGETOS=linux
ARG TARGETARCH=amd64

ARG OPENSHIFT_VERSION=4.9
ARG GOLANG_VERSION=1.19.9
ARG OPENSHIFT_VERSION=4.12
ARG KUSTOMIZE_VERSION=4.5.2
ARG KUBEBUILDER_VERSION=v3.3.0
ARG CONTROLLER_GEN_VERSION=v0.11.4
Expand All @@ -43,6 +44,12 @@ RUN --mount=type=cache,target=/root/.cache/dnf:rw \
nodejs \
jq

# Install go
RUN set -eux; \
wget -qO go.tgz "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz"; \
tar -C /usr/local -xzf go.tgz; \
go version && rm go.tgz

# Install pre-commit
ENV PIP_CACHE_DIR=/root/.cache/pip
RUN --mount=type=cache,target=/root/.cache/pip \
Expand Down Expand Up @@ -111,7 +118,8 @@ RUN true \
&& true

# For GitHub Action 'lint', work around error "detected dubious ownership in repository at '/workspace'"
RUN git config --system --add safe.directory /workspace
#RUN git config --system --add safe.directory /workspace
RUN git config --system --add safe.directory "*"

# The ubi/go-toolset image doesn't define ENTRYPOINT or CMD, but we need it to run 'make develop'
CMD /bin/bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- fvt.yaml
patchesStrategicMerge:
- remove_etcd_patch.yaml
namespace: modelmesh-serving
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$patch: delete
apiVersion: v1
kind: Service
metadata:
name: etcd
---
$patch: delete
apiVersion: v1
kind: Secret
metadata:
name: model-serving-etcd
---
$patch: delete
apiVersion: apps/v1
kind: Deployment
metadata:
name: etcd
7 changes: 7 additions & 0 deletions opendatahub/scripts/manifests/params.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
monitoring-namespace=opendatahub
odh-mm-rest-proxy=quay.io/opendatahub/rest-proxy:v0.11.0-rc0
odh-modelmesh-runtime-adapter=quay.io/opendatahub/modelmesh-runtime-adapter:v0.11.0-rc0
odh-modelmesh=quay.io/opendatahub/modelmesh:v0.11.0-rc0
odh-openvino=quay.io/opendatahub/openvino_model_server:2022.3-release
odh-modelmesh-controller=quay.io/opendatahub/modelmesh-controller:v0.11.0-rc0
odh-model-controller=quay.io/opendatahub/odh-model-controller:v0.11.0-rc0
75 changes: 75 additions & 0 deletions opendatahub/scripts/manifests/runtimes/mlserver-1.x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Copyright 2021 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: serving.kserve.io/v1alpha1
kind: ServingRuntime
metadata:
name: mlserver-1.x
labels:
name: modelmesh-serving-mlserver-1.x-SR
spec:
supportedModelFormats:
- name: sklearn
version: "0" # v0.23.1
autoSelect: true
- name: xgboost
version: "1" # v1.1.1
autoSelect: true
- name: lightgbm
version: "3" # v3.2.1
autoSelect: true

protocolVersions:
- grpc-v2
multiModel: true

grpcEndpoint: "port:8085"
grpcDataEndpoint: "port:8001"

containers:
- name: mlserver
image: mlserver-1:replace
env:
- name: MLSERVER_MODELS_DIR
value: "/models/_mlserver_models/"
- name: MLSERVER_GRPC_PORT
value: "8001"
# default value for HTTP port is 8080 which conflicts with MMesh's
# Litelinks port
- name: MLSERVER_HTTP_PORT
value: "8002"
- name: MLSERVER_LOAD_MODELS_AT_STARTUP
value: "false"
# Set a dummy model name via environment so that MLServer doesn't
# error on a RepositoryIndex call when no models exist
- name: MLSERVER_MODEL_NAME
value: dummy-model-fixme
# Set server addr to localhost to ensure MLServer only listen inside the pod
- name: MLSERVER_HOST
value: "127.0.0.1"
# Increase gRPC max message size to support larger payloads
# Unlimited because it will be restricted at the model mesh layer
- name: MLSERVER_GRPC_MAX_MESSAGE_LENGTH
value: "-1"
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: "5"
memory: 1Gi
builtInAdapter:
serverType: mlserver
runtimeManagementPort: 8001
memBufferBytes: 134217728
modelLoadingTimeoutMillis: 90000

0 comments on commit a16bbe3

Please sign in to comment.