forked from kubeflow/pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TF2OpenAPI Dockerfile + CloudBuild trigger (kubeflow#262)
* Add Dockerfile and GCB for pushing to GCR * Fix typo in cloudbuild command
- Loading branch information
1 parent
c9de6ef
commit 47c5816
Showing
3 changed files
with
49 additions
and
1 deletion.
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
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,31 @@ | ||
--- | ||
### Specify as necessary ### | ||
description: TF2OpenAPI Autobuilder | ||
substitutions: | ||
_COMPONENT: "tf2openapi" | ||
_DOCKERFILE: "./tools/tf2openapi/Dockerfile" | ||
_CONTEXT: "." | ||
########################### | ||
github: | ||
owner: kubeflow | ||
name: kfserving | ||
push: | ||
tag: v0.*.* | ||
### Specify as necessary ### | ||
includedFiles: | ||
- tools/tf2openapi/** | ||
- vendor/** | ||
- pkg/** | ||
########################### | ||
build: | ||
steps: | ||
- name: docker | ||
args: | ||
- "build" | ||
- "-t" | ||
- "gcr.io/$REPO_NAME/${_COMPONENT}:$TAG_NAME" | ||
- "-f" | ||
- "${_DOCKERFILE}" | ||
- "${_CONTEXT}" | ||
images: | ||
- gcr.io/$REPO_NAME/${_COMPONENT}:$TAG_NAME |
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,17 @@ | ||
# Build the manager binary | ||
FROM golang:1.10.3 as builder | ||
|
||
# Copy in the go src | ||
WORKDIR /go/src/github.com/kubeflow/kfserving | ||
COPY vendor/ vendor/ | ||
COPY tools/ tools/ | ||
COPY pkg/ pkg/ | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o tf2openapi ./tools/tf2openapi/cmd | ||
|
||
# Copy tf2openapi into a thin image | ||
FROM ubuntu:latest | ||
WORKDIR / | ||
COPY --from=builder /go/src/github.com/kubeflow/kfserving/tf2openapi . | ||
ENTRYPOINT ["/tf2openapi"] |