--- /dev/null
+# ==================================================================================#
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#==================================================================================
+
+
+FROM golang:1.19.8-bullseye as builder
+
+WORKDIR /kserve-adapter
+
+ENV GO111MODULE=on GOOS=linux GOARCH=amd64
+
+COPY . .
+
+RUN go install github.com/golang/mock/mockgen@v1.6.0 && go generate ./...
+RUN go mod tidy
+RUN go build -o kserve-adapter main.go
+
+FROM golang:1.19.8-bullseye
+
+WORKDIR /root/
+
+COPY --from=builder /kserve-adapter/kserve-adapter .
+
+EXPOSE 48099
+
+ENV KUBECONFIG=/home/.kube/config \
+ API_SERVER_PORT=48099 \
+ CHART_WORKSPACE_PATH="/kserve-adapter/pkg/helm/data" \
+ RIC_DMS_IP=127.0.0.1 \
+ RIC_DMS_PORT=8000
+
+ENTRYPOINT ["./kserve-adapter"]
+
+
.. Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
User-Guide
-==========
\ No newline at end of file
+==========
+
+.. contents::
+ :depth: 3
+ :local:
+
+
+Overview
+--------
+- Kserve Adapter works with the AIML Framework and is used to deploy, delete and update kserve-based apps.
+
+Build Image
+-----------
+Use the `docker build` command for docker image build.
+
+.. code-block:: none
+
+ kserve-adapter $ docker build -f Dockerfile .
+
+ Sending build context to Docker daemon 93.74MB
+ Step 1/11 : FROM golang:1.19.8-bullseye as builder
+ ---> b47c7dfaaa93
+ Step 2/11 : WORKDIR /kserve-adapter
+ ---> Using cache
+ ---> 6b397a834cc2
+ Step 3/11 : COPY . .
+ ---> Using cache
+ ---> 6a155a20fbde
+ Step 4/11 : ENV GO111MODULE=on GOOS=linux GOARCH=amd64
+ ---> Using cache
+ ---> f5be56bd7555
+ Step 5/11 : RUN go mod download
+ ---> Using cache
+ ---> 97862b975561
+ Step 6/11 : RUN go build -o kserve-adapter main.go
+ ---> Using cache
+ ---> 52a6ce04c444
+ Step 7/11 : FROM golang:1.19.8-bullseye
+ ---> b47c7dfaaa93
+ Step 8/11 : WORKDIR /root/
+ ---> Using cache
+ ---> c7870d2fbeba
+ Step 9/11 : COPY --from=builder /kserve-adapter/kserve-adapter .
+ ---> Using cache
+ ---> 4a2f88d946d6
+ Step 10/11 : EXPOSE 48099
+ ---> Using cache
+ ---> 8fbc694241e8
+ Step 11/11 : ENTRYPOINT ["./kserve-adapter"]
+ ---> Using cache
+ ---> d279266b588c
+ Successfully built d279266b588c
+
+Environments of Kserver Adapter
+---------------------------------------
++-----------------+---------------------------------+
+| KUBE_CONFIG | ex) ~/.kube/config |
++-----------------+---------------------------------+
+| API_SERVER_PORT | ex) "48099" |
++-----------------+---------------------------------+
\ No newline at end of file
)
require (
- github.com/golang/mock v1.4.4
+ github.com/golang/mock v1.6.0
github.com/spf13/viper v1.7.0
github.com/xeipuuv/gojsonschema v1.2.0
)
"github.com/kserve/kserve/pkg/apis/serving/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- kservemock "gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter/pkg/client/kserve/mock"
- onboardmock "gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter/pkg/client/onboard/mock"
"gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter/pkg/commons/errors"
)
"io/ioutil"
"os"
"path/filepath"
+ "strings"
- "github.com/xeipuuv/gojsonschema"
"gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter/pkg/commons/logger"
"gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter/pkg/util"
+ "github.com/xeipuuv/gojsonschema"
"gopkg.in/yaml.v1"
)
sphinxcontrib-httpdomain
recommonmark
lfdocs-conf
+ urllib3~=1.26.15
commands =
sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
sphinxcontrib-httpdomain
recommonmark
lfdocs-conf
+ urllib3~=1.26.15
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck