Skip to content

Commit

Permalink
First step to bring back CMLE sample. (#599)
Browse files Browse the repository at this point in the history
* First step to bring back CMLE sample.

Set GCP credential for gcloud. Do not export TPU Model because a) Serving does not need TPU. b) Workaround a CMLE 1.9 issue.

* Follow up on CR comments.

* Add comments.
  • Loading branch information
qimingj authored and k8s-ci-robot committed Jan 3, 2019
1 parent 3ef1646 commit 1c689ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def main(unused_argv):
per_host_input_for_training=tpu_config.InputPipelineConfig.PER_HOST_V2)) # pylint: disable=line-too-long

resnet_classifier = tpu_estimator.TPUEstimator(
export_to_tpu=False,
use_tpu=FLAGS.use_tpu,
model_fn=resnet_model_fn,
config=config,
Expand Down
7 changes: 7 additions & 0 deletions sdk/python/kfp/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ def _use_gcp_secret(task):
value=secret_volume_mount_path + secret_file_path_in_volume,
)
)
.add_env_variable(
k8s_client.V1EnvVar(
name='CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE',
value=secret_volume_mount_path + secret_file_path_in_volume,
)
) # Set GCloud Credentials by using the env var override.
# TODO: Is there a better way for GCloud to pick up the credential?
)

return _use_gcp_secret
Expand Down

0 comments on commit 1c689ed

Please sign in to comment.