Skip to content

Commit

Permalink
Add tf-operator.v2 to release.py so that we build a Docker image cont…
Browse files Browse the repository at this point in the history
…aining

the v1alpha2 controller.

Update the dockerfile to install the v1alpha2 operator.

Fix kubeflow#600
  • Loading branch information
jlewi committed May 22, 2018
1 parent 9be6c5d commit 2e36df9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build/images/tf_operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ RUN mkdir -p /opt/kubeflow/samples
COPY tf_smoke.py /opt/kubeflow/samples/
RUN chmod a+x /opt/kubeflow/samples/*
COPY tf-operator /opt/mlkube
COPY tf-operator.v2 /opt/kubeflow
COPY e2e /opt/mlkube/test
COPY backend /opt/tensorflow_k8s/dashboard/
COPY build /opt/tensorflow_k8s/dashboard/frontend/build

RUN chmod a+x /opt/kubeflow/tf-operator.v2
RUN chmod a+x /opt/mlkube/tf-operator
RUN chmod a+x /opt/mlkube/test/e2e
RUN chmod a+x /opt/tensorflow_k8s/dashboard/backend
Expand Down
5 changes: 4 additions & 1 deletion py/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,13 @@ def build_operator_image(root_dir,

targets = [
"github.com/kubeflow/tf-operator/cmd/tf-operator",
"github.com/kubeflow/tf-operator/cmd/tf-operator.v2",
"github.com/kubeflow/tf-operator/test/e2e",
"github.com/kubeflow/tf-operator/dashboard/backend",
]
for t in targets:
if t == "github.com/kubeflow/tf-operator/cmd/tf-operator":
if t in ["github.com/kubeflow/tf-operator/cmd/tf-operator",
"github.com/kubeflow/tf-operator/cmd/tf-operator.v2"]:
util.run([
"go", "install", "-ldflags",
"-X github.com/kubeflow/tf-operator/version.GitSHA={}".format(commit), t
Expand All @@ -176,6 +178,7 @@ def build_operator_image(root_dir,
"build/images/tf_operator/Dockerfile",
"examples/tf_sample/tf_sample/tf_smoke.py",
os.path.join(go_path, bin_path, "tf-operator"),
os.path.join(go_path, bin_path, "tf-operator.v2"),
os.path.join(go_path, bin_path, "e2e"),
os.path.join(go_path, bin_path, "backend"), "dashboard/frontend/build"
]
Expand Down

0 comments on commit 2e36df9

Please sign in to comment.