Skip to content

Commit

Permalink
Replace api group machinelearning with machinelearning.seldon.io (Sel…
Browse files Browse the repository at this point in the history
…donIO#1614)

* Replace api group machinelearning with machinelearning.seldon.io

Signed-off-by: glindsell <[email protected]>

* Fix merge conflicts

Signed-off-by: glindsell <[email protected]>

* Replace api group in executor and some operator files

Signed-off-by: glindsell <[email protected]>

* Change import in executor

Signed-off-by: glindsell <[email protected]>

* update executor group references to api and client

Signed-off-by: glindsell <[email protected]>

* Fix merge conflict filepath redeclaration bug

Signed-off-by: glindsell <[email protected]>

* Add runtime argument to Dockerfile and Makefile

Signed-off-by: glindsell <[email protected]>

* Update imports from merge

Signed-off-by: glindsell <[email protected]>
  • Loading branch information
George authored and groszewn committed Apr 3, 2020
1 parent be662dc commit 3abac93
Show file tree
Hide file tree
Showing 146 changed files with 4,844 additions and 1,938 deletions.
4 changes: 2 additions & 2 deletions doc/source/reference/seldon-deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ A SeldonDeployment is defined as a custom resource definition within Kubernetes.

If you want to learn about more practical examples of the use of the SeldonDeployment types you can check the `Inference Graph Section on the Worfklow Documentation Section <../graph/inference-grpah.md>`_.

Below is the 2nd half of our `seldondeployment_types.go <https://github.com/SeldonIO/seldon-core/blob/master/operator/apis/machinelearning/v1/seldondeployment_types.go>`_ file which contains the types that are used in the SeldonDeployment YAML files.
Below is the 2nd half of our `seldondeployment_types.go <https://github.com/SeldonIO/seldon-core/blob/master/operator/apis/machinelearning.seldon.io/v1/seldondeployment_types.go>`_ file which contains the types that are used in the SeldonDeployment YAML files.

.. literalinclude:: ../../../operator/apis/machinelearning/v1/seldondeployment_types.go
.. literalinclude:: ../../../operator/apis/machinelearning.seldon.io/v1/seldondeployment_types.go
:language: go
:lines: 163-

Expand Down
21 changes: 12 additions & 9 deletions executor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# Build the manager binary
FROM golang:1.13 as builder
ARG base=.

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY proto/ proto/
COPY ${base}/go.mod go.mod
COPY ${base}/go.sum go.sum
COPY ${base}/proto/ proto/
COPY operator/ ../operator/
# 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
RUN go mod download

# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY predictor/ predictor/
COPY logger/ logger/
COPY k8s/ k8s/
COPY ${base}/main.go main.go
COPY ${base}/api/ api/
COPY ${base}/predictor/ predictor/
COPY ${base}/logger/ logger/
COPY ${base}/k8s/ k8s/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o executor main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:latest
ARG base=.
WORKDIR /
COPY --from=builder /workspace/executor .
COPY licenses/license.txt .
COPY ${base}/licenses/license.txt .
ENTRYPOINT ["/executor"]
2 changes: 1 addition & 1 deletion executor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test: fmt vet

# Build the docker image
docker-build: test
docker build . -t ${IMG}
docker build -f Dockerfile -t ${IMG} --build-arg base=executor ..

# Push the docker image
docker-push:
Expand Down
7 changes: 4 additions & 3 deletions executor/api/client/seldondeployment_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package client

import (
"fmt"
"path/filepath"

"github.com/go-logr/logr"
"github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
clientset "github.com/seldonio/seldon-core/operator/client/machinelearning/v1/clientset/versioned/typed/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
clientset "github.com/seldonio/seldon-core/operator/client/machinelearning.seldon.io/v1/clientset/versioned/typed/machinelearning.seldon.io/v1"
v1meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/util/homedir"
"path/filepath"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
)

Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/opentracing/opentracing-go"
"github.com/seldonio/seldon-core/executor/api/metric"
"github.com/seldonio/seldon-core/executor/k8s"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"strconv"
Expand Down
Loading

0 comments on commit 3abac93

Please sign in to comment.