def create_virtual_machine_spec():
     spec = kubernetes_pod_spec.KubernetesPodSpec(
         _COMPONENT,
         install_packages=False,
         machine_type='test_machine_type',
         zone='test_zone')
     return spec
Пример #2
0
 def create_kubernetes_vm(os_type):
   spec = kubernetes_pod_spec.KubernetesPodSpec(
       _COMPONENT)
   vm_class = virtual_machine.GetVmClass(providers.KUBERNETES,
                                         os_type)
   kub_vm = vm_class(spec)
   kub_vm._WaitForPodBootCompletion = lambda: None
   kub_vm._Create()
Пример #3
0
 def create_virtual_machine_spec():
     spec = kubernetes_pod_spec.KubernetesPodSpec(
         _COMPONENT,
         image='nvidia/cuda:8.0-devel-ubuntu16.04',
         install_packages=False,
         machine_type='test_machine_type',
         zone='test_zone')
     return spec
Пример #4
0
 def create_kubernetes_vm():
     spec = kubernetes_pod_spec.KubernetesPodSpec(
         _COMPONENT,
         image='test_image',
         install_packages=False,
         machine_type='test_machine_type',
         zone='test_zone')
     kub_vm = TestKubernetesVirtualMachine(spec)
     kub_vm.name = _NAME
     kub_vm.vm_group = 'my_vm_group'
     kub_vm._WaitForPodBootCompletion = lambda: None  # pylint: disable=invalid-name
     kub_vm._Create()
 def create_virtual_machine_spec():
     spec = kubernetes_pod_spec.KubernetesPodSpec(
         _COMPONENT,
         resource_limits={
             'cpus': 2,
             'memory': '5GiB'
         },
         resource_requests={
             'cpus': 1.5,
             'memory': '4GiB'
         },
         gpu_count=2,
         gpu_type='k80',
     )
     return spec