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

olehmykolaishyn pushed a commit to branch gcp-jupyter-highgpu-template-1
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/gcp-jupyter-highgpu-template-1 
by this push:
     new 2541562  gpu type from var
2541562 is described below

commit 2541562bc73d655cfe05faf307d1066024bb0b8b
Author: oleh_mykolaishyn <[email protected]>
AuthorDate: Fri Mar 11 17:04:32 2022 +0200

    gpu type from var
---
 .../src/general/scripts/gcp/common_prepare_notebook.py       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
 
b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
index 533d255..c6ee2d3 100644
--- 
a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
+++ 
b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
@@ -162,15 +162,15 @@ if __name__ == "__main__":
 
         if os.environ['application'] in ('tensor', 'tensor-rstudio', 
'deeplearning') or os.environ['gpu_enabled'] == 'True':
             if os.environ['gpuType'] != '':
-                if os.environ['application'] == 'jupyter-gpu' or 
os.environ['application'] == 'jupyter-gpu-conda':
-                    notebook_config['gpu_accelerator_type'] == 
os.environ['gcp_jupyter_gpu_type']
-                    notebook_config['gpu_accelerator_count'] == '1'
-                else:
-                    notebook_config['gpu_accelerator_type'] = 
os.environ['gpuType']
-                    notebook_config['gpu_accelerator_count'] = 
os.environ['gpuCount']
+                notebook_config['gpu_accelerator_type'] = os.environ['gpuType']
+                notebook_config['gpu_accelerator_count'] = 
os.environ['gpuCount']
             else:
                 notebook_config['gpu_accelerator_type'] = 
os.environ['gcp_gpu_accelerator_type']
 
+        if os.environ['application'] in ('jupyter-gpu', 'jupyter-gpu-conda'):
+            notebook_config['gpu_accelerator_type'] = 
os.environ['gcp_jupyter_gpu_type']
+            notebook_config['gpu_accelerator_count'] = '1'
+
         notebook_config['network_tag'] = 
'{0}-{1}-{2}-ps'.format(notebook_config['service_base_name'],
                                                                  
notebook_config['project_name'],
                                                                  
notebook_config['endpoint_name'])

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

Reply via email to