Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from kserve:main #298

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build

on:
workflow_dispatch:
schedule:
- cron: '0 8 * * 1,4' # midnight US/Pacific on Sundays and Wednesdays
push:
branches:
- main
Expand Down
53 changes: 5 additions & 48 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
Expand Up @@ -21,53 +21,9 @@
###############################################################################
# Create the develop, test, and build environment
###############################################################################
ARG GOLANG_VERSION=1.21
FROM registry.access.redhat.com/ubi8/go-toolset:$GOLANG_VERSION

# TODO: replace the "go_toolset" build stage once ubi8/go-toolset:1.21 is available
# the go-toolset 1.21 is based on ubi9, we need to update it in the base image as well.
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as go-toolset

# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
# We need TARGETOS and TARGETARCH (not BUILDOS and BUILDARCH) since the developer
# image should be built for the OS of the developer using it (this is not a "builder image")
ARG TARGETOS
ARG TARGETARCH

ARG GOLANG_VERSION=1.21.6

USER root

ENV HOME=/root \
PATH=/usr/local/go/bin:$PATH:

WORKDIR /workspace

# install necessary tools that are included in the ubi/go-toolset image that we are temporarily replacing
RUN --mount=type=cache,target=/root/.cache/microdnf:rw \
microdnf --setopt=cachedir=/root/.cache/microdnf --nodocs install \
diffutils \
gcc-c++ \
make \
wget \
tar \
git \
which \
&& microdnf update --nodocs \
&& true

# install go
RUN true \
&& wget -qO go.tgz "https://golang.org/dl/go${GOLANG_VERSION}.${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" \
&& tar -C /usr/local -xzf go.tgz \
&& go version \
&& rm go.tgz \
&& true


####################################################################################
# TODO: replace "go-toolset" build stage with ubi/go-toolset:1.21 once available #
# and swap `microdnf` commands for `dnf` #
####################################################################################
FROM go-toolset

# 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,
Expand All @@ -90,7 +46,7 @@ WORKDIR /workspace
# Install build and dev tools
# NOTE: Require python38 to install pre-commit
RUN --mount=type=cache,target=/root/.cache/dnf:rw \
microdnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
nodejs \
jq \
python38 \
Expand Down Expand Up @@ -160,8 +116,9 @@ RUN true \
&& true

# Use setup-envtest for kubebuilder to use K8s version 1.23+ for autoscaling/v2 (HPA)
# Pin envtest to specific version until update to go 1.22
RUN true \
&& go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest \
&& go install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20240320141353-395cfc7486e6 \
&& setup-envtest use 1.26 \
&& true

Expand Down
2 changes: 1 addition & 1 deletion config/default/storage-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ metadata:
# "secret_access_key": "abcdff6a11223344aabbcc66ee231e6dd0c1122ff1234567",
# "endpoint_url": "https://s3.us-south.cloud-object-storage.appdomain.cloud",
# "region": "us-south",
# "default_bucket": "modelmesh-example-public"
# "bucket": "modelmesh-example-public"
# }
2 changes: 1 addition & 1 deletion config/dependencies/fvt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ stringData:
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"endpoint_url": "http://minio:9000",
"default_bucket": "modelmesh-example-models",
"bucket": "modelmesh-example-models",
"region": "us-south"
}
---
Expand Down
2 changes: 1 addition & 1 deletion config/dependencies/minio-storage-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ stringData:
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"endpoint_url": "http://minio.controller_namespace:9000",
"default_bucket": "modelmesh-example-models",
"bucket": "modelmesh-example-models",
"region": "us-south"
}
2 changes: 1 addition & 1 deletion config/dependencies/quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ stringData:
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"endpoint_url": "http://minio:9000",
"default_bucket": "modelmesh-example-models",
"bucket": "modelmesh-example-models",
"region": "us-south"
}
2 changes: 1 addition & 1 deletion docs/predictors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ There should be secret key called `localMinIO` that looks like:
"access_key": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"endpoint_url": "http://minio:9000",
"default_bucket": "modelmesh-example-models"
"bucket": "modelmesh-example-models"
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/predictors/setup-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $ mc ls myminio/models/onnx

### 3. Add a storage entry to the `storage-config` secret

Ensure there is a key defined in the common `storage-config` secret corresponding to the S3-based storage instance holding your model. The value of this secret key should be JSON like the following, `default_bucket` is optional.
Ensure there is a key defined in the common `storage-config` secret corresponding to the S3-based storage instance holding your model. The value of this secret key should be JSON like the following, `bucket` is optional.

Users can specify use of a custom certificate via the storage config `certificate` parameter. The custom certificate should be in the form of an embedded Certificate Authority (CA) bundle in PEM format.

Expand All @@ -72,7 +72,7 @@ Using MinIO the JSON contents look like:
"access_key_id": "minioadmin",
"secret_access_key": "minioadmin/K7JTCMP/EXAMPLEKEY",
"endpoint_url": "http://127.0.0.1:9000:9000",
"default_bucket": "",
"bucket": "",
"region": "us-east"
}
```
Expand Down Expand Up @@ -207,7 +207,7 @@ stringData:
# "access_key_id": "AKIAIOSFODNN7EXAMPLE",
# "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
# "endpoint_url": "http://minio:9000",
# "default_bucket": "modelmesh-example-models",
# "bucket": "modelmesh-example-models",
# "region": "us-south"
# }
pvc1: |
Expand Down
2 changes: 1 addition & 1 deletion fvt/globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var StorageConfigDataMinio = map[string]interface{}{
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"endpoint_url": "http://minio:9000",
"default_bucket": "modelmesh-example-models",
"bucket": "modelmesh-example-models",
"region": "us-south",
},
}
Expand Down