|
63 | 63 | _REQUEST_CHUNK_SIZE = 4194304 |
64 | 64 | _ROOT_PATH = pathlib.Path(__file__).resolve().parent.parent |
65 | 65 | _RESOURCES_PATH = None |
66 | | -__NVIDIA_DOCKER_RPM = { |
67 | | - 'url': ( |
68 | | - 'https://github.com/NVIDIA/nvidia-docker/releases/download/' |
69 | | - 'v1.0.1/nvidia-docker-1.0.1-1.x86_64.rpm' |
70 | | - ), |
71 | | - 'sha256': ( |
72 | | - 'f05dfe7fe655ed39c399db0d6362e351b059f2708c3e6da17f590a000237ec3a' |
73 | | - ), |
74 | | - 'target': 'nvidia-docker.rpm' |
75 | | -} |
76 | | -_NVIDIA_DOCKER = { |
77 | | - 'ubuntuserver': { |
78 | | - 'url': ( |
79 | | - 'https://github.com/NVIDIA/nvidia-docker/releases/download/' |
80 | | - 'v1.0.1/nvidia-docker_1.0.1-1_amd64.deb' |
81 | | - ), |
82 | | - 'sha256': ( |
83 | | - '9fbfd98f87ef2fd2e2137e3ba59431890dde6caf96f113ea0a1bd15bb3e51afa' |
84 | | - ), |
85 | | - 'target': 'nvidia-docker.deb' |
86 | | - }, |
87 | | - 'centos': __NVIDIA_DOCKER_RPM, |
88 | | - 'centos-hpc': __NVIDIA_DOCKER_RPM, |
89 | | -} |
90 | 66 | _NVIDIA_DRIVER = { |
91 | 67 | 'compute': { |
92 | 68 | 'url': ( |
@@ -304,36 +280,6 @@ def _setup_nvidia_driver_package(blob_client, config, vm_size): |
304 | 280 | return pkg |
305 | 281 |
|
306 | 282 |
|
307 | | -def _setup_nvidia_docker_package(blob_client, config): |
308 | | - # type: (azure.storage.blob.BlockBlobService, dict) -> pathlib.Path |
309 | | - """Set up the nvidia docker package |
310 | | - :param azure.storage.blob.BlockBlobService blob_client: blob client |
311 | | - :param dict config: configuration dict |
312 | | - :rtype: pathlib.Path |
313 | | - :return: package path |
314 | | - """ |
315 | | - offer = settings.pool_offer(config, lower=True) |
316 | | - pkg = _RESOURCES_PATH / _NVIDIA_DOCKER[offer]['target'] |
317 | | - # check to see if package is downloaded |
318 | | - if (not pkg.exists() or |
319 | | - util.compute_sha256_for_file(pkg, False) != |
320 | | - _NVIDIA_DOCKER[offer]['sha256']): |
321 | | - # download package |
322 | | - logger.debug('downloading NVIDIA docker to {}'.format( |
323 | | - _NVIDIA_DOCKER[offer]['target'])) |
324 | | - response = requests.get(_NVIDIA_DOCKER[offer]['url'], stream=True) |
325 | | - with pkg.open('wb') as f: |
326 | | - for chunk in response.iter_content(chunk_size=_REQUEST_CHUNK_SIZE): |
327 | | - if chunk: |
328 | | - f.write(chunk) |
329 | | - logger.debug('wrote {} bytes to {}'.format(pkg.stat().st_size, pkg)) |
330 | | - # check sha256 |
331 | | - if (util.compute_sha256_for_file(pkg, False) != |
332 | | - _NVIDIA_DOCKER[offer]['sha256']): |
333 | | - raise RuntimeError('sha256 mismatch for {}'.format(pkg)) |
334 | | - return pkg |
335 | | - |
336 | | - |
337 | 283 | def _generate_azure_mount_script_name( |
338 | 284 | batch_account_name, pool_id, is_file_share, is_windows): |
339 | 285 | # type: (str, str, bool, bool) -> pathlib.Path |
@@ -1022,12 +968,9 @@ def _construct_pool_object( |
1022 | 968 | gpu_type = settings.get_gpu_type_from_vm_size( |
1023 | 969 | pool_settings.vm_size) |
1024 | 970 | gpu_driver = pathlib.Path(_NVIDIA_DRIVER[gpu_type]['target']) |
1025 | | - gpupkg = _setup_nvidia_docker_package(blob_client, config) |
1026 | | - _rflist.append((gpupkg.name, gpupkg)) |
1027 | | - gpu_env = '{}:{}:{}'.format( |
| 971 | + gpu_env = '{}:{}'.format( |
1028 | 972 | settings.is_gpu_visualization_pool(pool_settings.vm_size), |
1029 | | - gpu_driver.name, |
1030 | | - gpupkg.name) |
| 973 | + gpu_driver.name) |
1031 | 974 | else: |
1032 | 975 | gpu_env = None |
1033 | 976 | # get container registries |
@@ -2006,8 +1949,9 @@ def _adjust_settings_for_pool_creation(config): |
2006 | 1949 | config, vm_size=pool.vm_size) |
2007 | 1950 | if not allowed and util.is_none_or_empty(node_agent): |
2008 | 1951 | raise ValueError( |
2009 | | - ('unsupported Docker Host VM Config, publisher={} offer={} ' |
2010 | | - 'sku={} vm_size={}').format(publisher, offer, sku, pool.vm_size)) |
| 1952 | + ('unsupported Docker (and/or GPU) Host VM Config, publisher={} ' |
| 1953 | + 'offer={} sku={} vm_size={}').format( |
| 1954 | + publisher, offer, sku, pool.vm_size)) |
2011 | 1955 | # ensure HPC offers are matched with RDMA sizes |
2012 | 1956 | if (not is_windows and ( |
2013 | 1957 | (offer == 'centos-hpc' or offer == 'sles-hpc') and |
|
0 commit comments