Skip to content

Commit

Permalink
update Daemonset API for GPU driver installing
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchihe committed Dec 6, 2019
1 parent c7152c2 commit 2446a48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py/kubeflow/testing/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,14 +628,14 @@ def install_gpu_drivers(api_client):
"""
logging.info("Install GPU Drivers.")
# Fetch the daemonset to install the drivers.
link = "https://raw.githubusercontent.com/GoogleCloudPlatform/container-engine-accelerators/stable/nvidia-driver-installer/cos/daemonset-preloaded.yaml" # pylint: disable=line-too-long
link = "https://raw.githubusercontent.com/GoogleCloudPlatform/container-engine-accelerators/master/nvidia-driver-installer/cos/daemonset-preloaded.yaml" # pylint: disable=line-too-long
logging.info("Using daemonset file: %s", link)
f = urllib.urlopen(link)
daemonset_spec = yaml.load(f)
ext_client = k8s_client.ExtensionsV1beta1Api(api_client)
appv1_client = k8s_client.AppsV1Api(api_client)
try:
namespace = daemonset_spec["metadata"]["namespace"]
ext_client.create_namespaced_daemon_set(namespace, daemonset_spec)
appv1_client.create_namespaced_daemon_set(namespace, daemonset_spec)
except rest.ApiException as e:
# Status appears to be a string.
if e.status == 409:
Expand Down

0 comments on commit 2446a48

Please sign in to comment.