This repository has been archived by the owner on Sep 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use multi-build to build pytorch-operator image (#198)
* Use multi-build to build pytorch-operator image Use multi-build to build pytorch-operator image. * Update Dockerfile * Update Dockerfile
- Loading branch information
1 parent
f85242a
commit 9a6ae63
Showing
3 changed files
with
14 additions
and
9 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
.git | ||
.gitignore | ||
#!include:.gitignore | ||
vendor | ||
#vendor |
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 |
---|---|---|
@@ -1,6 +1,17 @@ | ||
FROM golang:1.12 AS build-image | ||
|
||
ADD . /go/src/github.com/kubeflow/pytorch-operator | ||
|
||
WORKDIR /go/src/github.com/kubeflow/pytorch-operator | ||
|
||
# Build pytorch operator v1beta2 binary | ||
RUN go build ./cmd/pytorch-operator.v1beta2 | ||
# Build pytorch operator v1 binary | ||
RUN go build ./cmd/pytorch-operator.v1 | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
COPY pytorch-operator.v1beta2 /pytorch-operator.v1beta2 | ||
COPY pytorch-operator.v1 /pytorch-operator.v1 | ||
COPY --from=build-image /go/src/github.com/kubeflow/pytorch-operator/pytorch-operator.v1beta2 /pytorch-operator.v1beta2 | ||
COPY --from=build-image /go/src/github.com/kubeflow/pytorch-operator/pytorch-operator.v1 /pytorch-operator.v1 | ||
|
||
ENTRYPOINT ["/pytorch-operator", "-alsologtostderr"] |
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