forked from kserve/modelmesh
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jooho <[email protected]>
- Loading branch information
Showing
4 changed files
with
1,674 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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. | ||
repos: | ||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.43.0 | ||
hooks: | ||
- id: golangci-lint | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.4.1 | ||
hooks: | ||
- id: prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# 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. | ||
|
||
############################################################################### | ||
# Create the develop, test, and build environment | ||
############################################################################### | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7 | ||
|
||
ARG GOLANG_VERSION=1.18.9 | ||
ARG OPENSHIFT_VERSION=4.9 | ||
ARG KUSTOMIZE_VERSION=4.5.2 | ||
ARG KUBEBUILDER_VERSION=v3.3.0 | ||
ARG CONTROLLER_GEN_VERSION=v0.8.0 | ||
ENV PATH=/usr/local/go/bin:$PATH:/usr/local/kubebuilder/bin: | ||
|
||
USER root | ||
|
||
WORKDIR /workspace | ||
|
||
# Copy the Go Modules manifests | ||
COPY .pre-commit-config.yaml ./ | ||
COPY go.mod.develop ./go.mod | ||
COPY go.sum.develop ./go.sum | ||
|
||
# Install gcc | ||
RUN microdnf install \ | ||
diffutils \ | ||
gcc-c++ \ | ||
make \ | ||
wget \ | ||
tar \ | ||
vim \ | ||
git \ | ||
findutils \ | ||
python38 \ | ||
nodejs && \ | ||
pip3 install pre-commit && \ | ||
# Install go | ||
set -eux; \ | ||
wget -qO go.tgz "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz"; \ | ||
# sha256sum *go.tgz; \ | ||
tar -C /usr/local -xzf go.tgz; \ | ||
go version && rm go.tgz && \ | ||
# Download and initialize the pre-commit environments before copying the source so they will be cached | ||
git init && \ | ||
pre-commit install-hooks && \ | ||
rm -rf .git && \ | ||
# Download kubebuilder | ||
true \ | ||
# First download and extract older dist of kubebuilder which includes required etcd, kube-apiserver and kubectl binaries | ||
&& curl -L https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.2/kubebuilder_2.3.2_linux_amd64.tar.gz | tar -xz -C /tmp/ \ | ||
&& mv /tmp/kubebuilder_*_linux_amd64 /usr/local/kubebuilder \ | ||
# Then download and overwrite kubebuilder binary with desired/latest version | ||
&& curl -L https://github.com/kubernetes-sigs/kubebuilder/releases/download/${KUBEBUILDER_VERSION}/kubebuilder_linux_amd64 -o /usr/local/kubebuilder/bin/kubebuilder \ | ||
&& true && \ | ||
# download openshift-cli | ||
curl -sSLf --output /tmp/oc_client.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-${OPENSHIFT_VERSION}/openshift-client-linux.tar.gz \ | ||
&& tar -xvf /tmp/oc_client.tar.gz -C /tmp \ | ||
&& mv /tmp/oc /usr/local/bin \ | ||
&& mv /tmp/kubectl /usr/local/bin \ | ||
&& chmod a+x /usr/local/bin/oc /usr/local/bin/kubectl \ | ||
&& rm -f /tmp/oc_client.tar.gz && \ | ||
# download kustomize | ||
curl -sSLf --output /tmp/kustomize.tar.gz https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz \ | ||
&& tar -xvf /tmp/kustomize.tar.gz -C /tmp \ | ||
&& mv /tmp/kustomize /usr/local/bin \ | ||
&& chmod a+x /usr/local/bin/kustomize \ | ||
&& rm -v /tmp/kustomize.tar.gz && \ | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
go mod download && \ | ||
# Install controller-gen | ||
mkdir /tmp/controller-gen-tmp && cd /tmp/controller-gen-tmp \ | ||
&& go mod init tmp && go get sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} && go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} \ | ||
&& rm -rf /tmp/controller-gen-tmp | ||
|
||
RUN go install github.com/onsi/ginkgo/v2/ginkgo | ||
ENV PATH=/root/go/bin/:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
module github.com/kserve/modelmesh-serving | ||
|
||
go 1.18 | ||
|
||
require ( | ||
github.com/dereklstinson/cifar v0.0.0-20200421171932-5722a3b6a0c7 | ||
github.com/go-logr/logr v1.2.3 | ||
github.com/golang/protobuf v1.5.2 | ||
github.com/google/go-cmp v0.5.8 | ||
github.com/kserve/kserve v0.10.0 | ||
github.com/manifestival/controller-runtime-client v0.4.0 | ||
github.com/manifestival/manifestival v0.7.1 | ||
github.com/moverest/mnist v0.0.0-20160628192128-ec5d9d203b59 | ||
github.com/onsi/ginkgo/v2 v2.1.3 | ||
github.com/onsi/gomega v1.18.1 | ||
github.com/operator-framework/operator-lib v0.10.0 | ||
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.55.0 | ||
github.com/spf13/viper v1.10.1 | ||
github.com/stretchr/testify v1.8.0 | ||
github.com/tommy351/goldga v0.5.0 | ||
go.etcd.io/etcd/api/v3 v3.5.3 | ||
go.etcd.io/etcd/client/v3 v3.5.3 | ||
go.uber.org/atomic v1.9.0 | ||
google.golang.org/grpc v1.48.0 | ||
google.golang.org/protobuf v1.28.1 | ||
k8s.io/api v0.23.9 | ||
k8s.io/apimachinery v0.23.9 | ||
k8s.io/client-go v0.23.9 | ||
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15 | ||
sigs.k8s.io/controller-runtime v0.11.2 | ||
sigs.k8s.io/yaml v1.3.0 | ||
) | ||
|
||
require ( | ||
cloud.google.com/go v0.102.1 // indirect | ||
cloud.google.com/go/compute v1.7.0 // indirect | ||
cloud.google.com/go/iam v0.4.0 // indirect | ||
cloud.google.com/go/storage v1.22.1 // indirect | ||
github.com/BurntSushi/toml v1.0.0 // indirect | ||
github.com/PuerkitoBio/purell v1.1.1 // indirect | ||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect | ||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 // indirect | ||
github.com/aws/aws-sdk-go v1.36.30 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/blendle/zapdriver v1.3.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.1.2 // indirect | ||
github.com/coreos/go-semver v0.3.0 // indirect | ||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/emicklei/go-restful v2.9.5+incompatible // indirect | ||
github.com/evanphx/json-patch v4.12.0+incompatible // indirect | ||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect | ||
github.com/fsnotify/fsnotify v1.5.1 // indirect | ||
github.com/go-logr/zapr v1.2.0 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.5 // indirect | ||
github.com/go-openapi/jsonreference v0.19.5 // indirect | ||
github.com/go-openapi/swag v0.19.15 // indirect | ||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||
github.com/google/go-containerregistry v0.8.1-0.20220414143355-892d7a808387 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect | ||
github.com/googleapis/gax-go/v2 v2.4.0 // indirect | ||
github.com/googleapis/gnostic v0.5.5 // indirect | ||
github.com/googleapis/go-type-adapters v1.0.0 // indirect | ||
github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/imdario/mergo v0.3.12 // indirect | ||
github.com/jmespath/go-jmespath v0.4.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/logrusorgru/aurora/v3 v3.0.0 // indirect | ||
github.com/magiconair/properties v1.8.5 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect | ||
github.com/mitchellh/mapstructure v1.4.3 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/pelletier/go-toml v1.9.4 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/prometheus/client_golang v1.14.0 // indirect | ||
github.com/prometheus/client_model v0.3.0 // indirect | ||
github.com/prometheus/common v0.39.0 // indirect | ||
github.com/prometheus/procfs v0.8.0 // indirect | ||
github.com/sergi/go-diff v1.2.0 // indirect | ||
github.com/spf13/afero v1.6.0 // indirect | ||
github.com/spf13/cast v1.4.1 // indirect | ||
github.com/spf13/jwalterweatherman v1.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/subosito/gotenv v1.2.0 // indirect | ||
go.etcd.io/etcd/client/pkg/v3 v3.5.3 // indirect | ||
go.opencensus.io v0.23.0 // indirect | ||
go.uber.org/multierr v1.6.0 // indirect | ||
go.uber.org/zap v1.19.1 // indirect | ||
golang.org/x/net v0.4.0 // indirect | ||
golang.org/x/oauth2 v0.3.0 // indirect | ||
golang.org/x/sys v0.3.0 // indirect | ||
golang.org/x/term v0.3.0 // indirect | ||
golang.org/x/text v0.5.0 // indirect | ||
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect | ||
golang.org/x/tools v0.1.12 // indirect | ||
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect | ||
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect | ||
google.golang.org/api v0.93.0 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/ini.v1 v1.66.2 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
k8s.io/apiextensions-apiserver v0.23.9 // indirect | ||
k8s.io/component-base v0.23.9 // indirect | ||
k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f // indirect | ||
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect | ||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect | ||
knative.dev/networking v0.0.0-20220818010248-e51df7cdf571 // indirect | ||
knative.dev/serving v0.34.0 // indirect | ||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect | ||
) | ||
|
||
replace ( | ||
// Update go-restful library to avoid CVE-2022-1996 | ||
github.com/emicklei/go-restful => github.com/emicklei/go-restful v2.16.0+incompatible | ||
|
||
// Update prometheus client to avoid CVE-2022-21698 | ||
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.12.1 | ||
) |
Oops, something went wrong.