This is an automated email from the ASF dual-hosted git repository.

mykolabodnar pushed a commit to branch DATALAB-2480
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 9eb0c2db0d6ed004ceb19b77ed55be4e95bcb3be
Author: bodnarmykola <[email protected]>
AuthorDate: Thu Jul 8 13:44:06 2021 +0300

    [DATALAB-2480] - [GCP] Dataproc creation based on GPU fixed
---
 .../src/general/scripts/gcp/dataengine-service_prepare.py      | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py
 
b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py
index 83d8740..3229525 100644
--- 
a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py
+++ 
b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py
@@ -140,12 +140,12 @@ if __name__ == "__main__":
 
     subprocess.run("echo Waiting for changes to propagate; sleep 10", 
shell=True, check=True)
 
-    if 'masterGPUCount' in os.environ:
+    if 'master_gpu_count' in os.environ:
         dataproc_cluster = 
json.loads(open('/root/templates/dataengine-service_cluster_with_gpu.json').read())
-        
dataproc_cluster['config']['masterConfig']['accelerators'][0]['acceleratorCount']
 = int(os.environ['masterGPUCount'])
-        
dataproc_cluster['config']['masterConfig']['accelerators'][0]['acceleratorTypeUri']
 = os.environ['masterGPUType']
-        
dataproc_cluster['config']['workerConfig']['accelerators'][0]['acceleratorCount']
 = int(os.environ['slaveGPUCount'])
-        
dataproc_cluster['config']['workerConfig']['accelerators'][0]['acceleratorTypeUri']
 = os.environ['slaveGPUType']
+        
dataproc_cluster['config']['masterConfig']['accelerators'][0]['acceleratorCount']
 = int(os.environ['master_gpu_count'])
+        
dataproc_cluster['config']['masterConfig']['accelerators'][0]['acceleratorTypeUri']
 = os.environ['master_gpu_type']
+        
dataproc_cluster['config']['workerConfig']['accelerators'][0]['acceleratorCount']
 = int(os.environ['slave_gpu_count'])
+        
dataproc_cluster['config']['workerConfig']['accelerators'][0]['acceleratorTypeUri']
 = os.environ['slave_gpu_type']
         gpu_driver = 
'gs://goog-dataproc-initialization-actions-{}/gpu/install_gpu_driver.sh'.format(dataproc_conf['region'])
         
dataproc_cluster['config']['initializationActions'][0]['executableFile'] = 
gpu_driver
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to