We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
trials not launching in local experiment
I'm running into an issue running local experiments: the dispatcher fails to launch any of the individual trials. Even waiting for hours, no trials are launched, though the system appears to still be checking for coverage data in the measurement loop from the logs.

This happens every time I try to run a local experiment.

I've checked `/tmp` in the dispatcher container during one of these failed runs, and there are no logs from any of the runner startup scripts, nor do the runner containers appear to ever start. However, if I then manually run the startup script in the dispatcher container (e.g. `docker exec -it dispatcher-container /bin/bash; /tmp/r-startup-script3.sh`) the trial / runner container starts up with no issues.

I've tried adding some logging to the python code that starts the runners but everything looked fine from that end and I was not able to figure out what the cause of the issue is.

I've been able to reproduce this issue on multiple machines running recent versions of Ubuntu. The only changes I made to master were to add `rsync` to the relevant dockerfiles to work around: https://github.com/google/fuzzbench/issues/1593

OS: Ubuntu (e.g. 22.04)
Docker version: e.g. 20.10.22
Commit: aa6ddd05
Reproduction: 
1. add rsync to Dockerfiles; 
2. make; 
3. docker build the dispatcher image; 
4. run an experiment with basic config e.g. [experiment-config.yaml.txt](https://github.com/google/fuzzbench/files/10322923/experiment-config.yaml.txt) using command such as
[exp.sh.txt](https://github.com/google/fuzzbench/files/10322924/exp.sh.txt)

Any insight would be much appreciated! And I'd be happy to provide logs / additional information as needed.

Thanks!

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `common/gcloud.py`
Content:
```
1 # Copyright 2020 Google LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 """Google cloud related code."""
15 
16 import enum
17 import posixpath
18 import subprocess
19 from typing import List, Optional
20 
21 from common import experiment_utils
22 from common import logs
23 from common import new_process
24 
25 # Constants for dispatcher specs.
26 DISPATCHER_MACHINE_TYPE = 'n1-highmem-96'
27 DISPATCHER_BOOT_DISK_SIZE = '4TB'
28 DISPATCHER_BOOT_DISK_TYPE = 'pd-ssd'
29 
30 # Constants for runner specs.
31 RUNNER_BOOT_DISK_SIZE = '200GB'
32 
33 # Constants for measurer worker specs.
34 MEASURER_WORKER_MACHINE_TYPE = 'n1-standard-1'
35 MEASURER_WORKER_BOOT_DISK_SIZE = '50GB'
36 
37 # Number of instances to process at once.
38 INSTANCE_BATCH_SIZE = 100
39 
40 
41 class InstanceType(enum.Enum):
42     """Types of instances we need for the experiment."""
43     DISPATCHER = 0
44     RUNNER = 1
45 
46 
47 def create_instance(instance_name: str,
48                     instance_type: InstanceType,
49                     config: dict,
50                     startup_script: Optional[str] = None,
51                     preemptible: bool = False,
52                     **kwargs) -> bool:
53     """Creates a GCE instance with name, |instance_name|, type, |instance_type|
54     and with optionally provided and |startup_script|."""
55 
56     if experiment_utils.is_local_experiment():
57         return run_local_instance(startup_script)
58 
59     command = [
60         'gcloud',
61         'compute',
62         'instances',
63         'create',
64         instance_name,
65         '--image-family=cos-stable',
66         '--image-project=cos-cloud',
67         f'--zone={config["cloud_compute_zone"]}',
68         '--scopes=cloud-platform',
69     ]
70     if instance_type == InstanceType.DISPATCHER:
71         command.extend([
72             f'--machine-type={DISPATCHER_MACHINE_TYPE}',
73             f'--boot-disk-size={DISPATCHER_BOOT_DISK_SIZE}',
74             f'--boot-disk-type={DISPATCHER_BOOT_DISK_TYPE}',
75         ])
76     else:
77         machine_type = config['runner_machine_type']
78         if machine_type is not None:
79             command.append(f'--machine-type={machine_type}')
80         else:
81             # Do this to support KLEE experiments.
82             command.append([
83                 f'--custom-memory={config["runner_memory"]}',
84                 f'--custom-cpu={config["runner_num_cpu_cores"]}',
85             ])
86 
87         command.extend([
88             '--no-address',
89             f'--boot-disk-size={RUNNER_BOOT_DISK_SIZE}',
90         ])
91 
92     if preemptible:
93         command.append('--preemptible')
94     if startup_script:
95         command.extend(
96             ['--metadata-from-file', f'startup-script={startup_script}'])
97 
98     result = new_process.execute(command, expect_zero=False, **kwargs)
99     if result.retcode == 0:
100         return True
101 
102     logs.info('Failed to create instance. Command: %s failed. Output: %s',
103               command, result.output)
104     return False
105 
106 
107 def delete_instances(instance_names: List[str], zone: str, **kwargs) -> bool:
108     """Delete gcloud instance |instance_names|. Returns true if the operation
109     succeeded or false otherwise."""
110     error_occurred = False
111     # Delete instances in batches, otherwise we run into rate limit errors.
112     for idx in range(0, len(instance_names), INSTANCE_BATCH_SIZE):
113         # -q is needed otherwise gcloud will prompt "Y/N?".
114         command = ['gcloud', 'compute', 'instances', 'delete', '-q']
115         command.extend(instance_names[idx:idx + INSTANCE_BATCH_SIZE])
116         command.extend(['--zone', zone])
117         result = new_process.execute(command, expect_zero=False, **kwargs)
118         error_occurred = error_occurred or result.retcode != 0
119 
120     return not error_occurred
121 
122 
123 def set_default_project(cloud_project: str):
124     """Set default project for future gcloud and gsutil commands."""
125     return new_process.execute(
126         ['gcloud', 'config', 'set', 'project', cloud_project])
127 
128 
129 def run_local_instance(startup_script: Optional[str] = None) -> bool:
130     """Does the equivalent of "create_instance" for local experiments, runs
131     |startup_script| in the background."""
132     command = ['/bin/bash', startup_script]
133     with subprocess.Popen(command,
134                           stdout=subprocess.PIPE,
135                           stderr=subprocess.STDOUT):
136         return new_process.ProcessResult(0, '', False)
137 
138 
139 def create_instance_template(template_name, docker_image, env, project, zone):
140     """Returns a ProcessResult from running the command to create an instance
141     template."""
142     # Creating an instance template cannot be done using the GCE API because
143     # there is no public API for handling some docker related functionality that
144     # we need.
145     command = [
146         'gcloud', 'compute', '--project', project, 'instance-templates',
147         'create-with-container', template_name, '--no-address',
148         '--image-family=cos-stable', '--image-project=cos-cloud',
149         f'--region={zone}', '--scopes=cloud-platform',
150         f'--machine-type={MEASURER_WORKER_MACHINE_TYPE}',
151         f'--boot-disk-size={MEASURER_WORKER_BOOT_DISK_SIZE}', '--preemptible',
152         '--container-image', docker_image
153     ]
154     for item in env.items():
155         command.extend(['--container-env', f'{item[0]}={item[1]}'])
156     new_process.execute(command)
157     return posixpath.join('https://www.googleapis.com/compute/v1/projects/',
158                           project, 'global', 'instanceTemplates', template_name)
159 
160 
161 def delete_instance_template(template_name: str):
162     """Returns a ProcessResult from running the command to delete the
163     measure_worker template for this |experiment|."""
164     command = [
165         'gcloud', 'compute', 'instance-templates', 'delete', template_name
166     ]
167     return new_process.execute(command)
168 
169 
170 def get_account():
171     """Returns the email address of the current account being used."""
172     return new_process.execute(['gcloud', 'config', 'get-value',
173                                 'account']).output.strip()
174
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/common/gcloud.py b/common/gcloud.py
--- a/common/gcloud.py
+++ b/common/gcloud.py
@@ -130,10 +130,9 @@
     """Does the equivalent of "create_instance" for local experiments, runs
     |startup_script| in the background."""
     command = ['/bin/bash', startup_script]
-    with subprocess.Popen(command,
-                          stdout=subprocess.PIPE,
-                          stderr=subprocess.STDOUT):
-        return new_process.ProcessResult(0, '', False)
+    # pylint: disable=consider-using-with
+    subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+    return True
 
 
 def create_instance_template(template_name, docker_image, env, project, zone):

{"golden_diff": "diff --git a/common/gcloud.py b/common/gcloud.py\n--- a/common/gcloud.py\n+++ b/common/gcloud.py\n@@ -130,10 +130,9 @@\n     \"\"\"Does the equivalent of \"create_instance\" for local experiments, runs\n     |startup_script| in the background.\"\"\"\n     command = ['/bin/bash', startup_script]\n-    with subprocess.Popen(command,\n-                          stdout=subprocess.PIPE,\n-                          stderr=subprocess.STDOUT):\n-        return new_process.ProcessResult(0, '', False)\n+    # pylint: disable=consider-using-with\n+    subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n+    return True\n \n \n def create_instance_template(template_name, docker_image, env, project, zone):\n", "issue": "trials not launching in local experiment\nI'm running into an issue running local experiments: the dispatcher fails to launch any of the individual trials. Even waiting for hours, no trials are launched, though the system appears to still be checking for coverage data in the measurement loop from the logs.\r\n\r\nThis happens every time I try to run a local experiment.\r\n\r\nI've checked `/tmp` in the dispatcher container during one of these failed runs, and there are no logs from any of the runner startup scripts, nor do the runner containers appear to ever start. However, if I then manually run the startup script in the dispatcher container (e.g. `docker exec -it dispatcher-container /bin/bash; /tmp/r-startup-script3.sh`) the trial / runner container starts up with no issues.\r\n\r\nI've tried adding some logging to the python code that starts the runners but everything looked fine from that end and I was not able to figure out what the cause of the issue is.\r\n\r\nI've been able to reproduce this issue on multiple machines running recent versions of Ubuntu. The only changes I made to master were to add `rsync` to the relevant dockerfiles to work around: https://github.com/google/fuzzbench/issues/1593\r\n\r\nOS: Ubuntu (e.g. 22.04)\r\nDocker version: e.g. 20.10.22\r\nCommit: aa6ddd05\r\nReproduction: \r\n1. add rsync to Dockerfiles; \r\n2. make; \r\n3. docker build the dispatcher image; \r\n4. run an experiment with basic config e.g. [experiment-config.yaml.txt](https://github.com/google/fuzzbench/files/10322923/experiment-config.yaml.txt) using command such as\r\n[exp.sh.txt](https://github.com/google/fuzzbench/files/10322924/exp.sh.txt)\r\n\r\nAny insight would be much appreciated! And I'd be happy to provide logs / additional information as needed.\r\n\r\nThanks!\n", "before_files": [{"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Google cloud related code.\"\"\"\n\nimport enum\nimport posixpath\nimport subprocess\nfrom typing import List, Optional\n\nfrom common import experiment_utils\nfrom common import logs\nfrom common import new_process\n\n# Constants for dispatcher specs.\nDISPATCHER_MACHINE_TYPE = 'n1-highmem-96'\nDISPATCHER_BOOT_DISK_SIZE = '4TB'\nDISPATCHER_BOOT_DISK_TYPE = 'pd-ssd'\n\n# Constants for runner specs.\nRUNNER_BOOT_DISK_SIZE = '200GB'\n\n# Constants for measurer worker specs.\nMEASURER_WORKER_MACHINE_TYPE = 'n1-standard-1'\nMEASURER_WORKER_BOOT_DISK_SIZE = '50GB'\n\n# Number of instances to process at once.\nINSTANCE_BATCH_SIZE = 100\n\n\nclass InstanceType(enum.Enum):\n    \"\"\"Types of instances we need for the experiment.\"\"\"\n    DISPATCHER = 0\n    RUNNER = 1\n\n\ndef create_instance(instance_name: str,\n                    instance_type: InstanceType,\n                    config: dict,\n                    startup_script: Optional[str] = None,\n                    preemptible: bool = False,\n                    **kwargs) -> bool:\n    \"\"\"Creates a GCE instance with name, |instance_name|, type, |instance_type|\n    and with optionally provided and |startup_script|.\"\"\"\n\n    if experiment_utils.is_local_experiment():\n        return run_local_instance(startup_script)\n\n    command = [\n        'gcloud',\n        'compute',\n        'instances',\n        'create',\n        instance_name,\n        '--image-family=cos-stable',\n        '--image-project=cos-cloud',\n        f'--zone={config[\"cloud_compute_zone\"]}',\n        '--scopes=cloud-platform',\n    ]\n    if instance_type == InstanceType.DISPATCHER:\n        command.extend([\n            f'--machine-type={DISPATCHER_MACHINE_TYPE}',\n            f'--boot-disk-size={DISPATCHER_BOOT_DISK_SIZE}',\n            f'--boot-disk-type={DISPATCHER_BOOT_DISK_TYPE}',\n        ])\n    else:\n        machine_type = config['runner_machine_type']\n        if machine_type is not None:\n            command.append(f'--machine-type={machine_type}')\n        else:\n            # Do this to support KLEE experiments.\n            command.append([\n                f'--custom-memory={config[\"runner_memory\"]}',\n                f'--custom-cpu={config[\"runner_num_cpu_cores\"]}',\n            ])\n\n        command.extend([\n            '--no-address',\n            f'--boot-disk-size={RUNNER_BOOT_DISK_SIZE}',\n        ])\n\n    if preemptible:\n        command.append('--preemptible')\n    if startup_script:\n        command.extend(\n            ['--metadata-from-file', f'startup-script={startup_script}'])\n\n    result = new_process.execute(command, expect_zero=False, **kwargs)\n    if result.retcode == 0:\n        return True\n\n    logs.info('Failed to create instance. Command: %s failed. Output: %s',\n              command, result.output)\n    return False\n\n\ndef delete_instances(instance_names: List[str], zone: str, **kwargs) -> bool:\n    \"\"\"Delete gcloud instance |instance_names|. Returns true if the operation\n    succeeded or false otherwise.\"\"\"\n    error_occurred = False\n    # Delete instances in batches, otherwise we run into rate limit errors.\n    for idx in range(0, len(instance_names), INSTANCE_BATCH_SIZE):\n        # -q is needed otherwise gcloud will prompt \"Y/N?\".\n        command = ['gcloud', 'compute', 'instances', 'delete', '-q']\n        command.extend(instance_names[idx:idx + INSTANCE_BATCH_SIZE])\n        command.extend(['--zone', zone])\n        result = new_process.execute(command, expect_zero=False, **kwargs)\n        error_occurred = error_occurred or result.retcode != 0\n\n    return not error_occurred\n\n\ndef set_default_project(cloud_project: str):\n    \"\"\"Set default project for future gcloud and gsutil commands.\"\"\"\n    return new_process.execute(\n        ['gcloud', 'config', 'set', 'project', cloud_project])\n\n\ndef run_local_instance(startup_script: Optional[str] = None) -> bool:\n    \"\"\"Does the equivalent of \"create_instance\" for local experiments, runs\n    |startup_script| in the background.\"\"\"\n    command = ['/bin/bash', startup_script]\n    with subprocess.Popen(command,\n                          stdout=subprocess.PIPE,\n                          stderr=subprocess.STDOUT):\n        return new_process.ProcessResult(0, '', False)\n\n\ndef create_instance_template(template_name, docker_image, env, project, zone):\n    \"\"\"Returns a ProcessResult from running the command to create an instance\n    template.\"\"\"\n    # Creating an instance template cannot be done using the GCE API because\n    # there is no public API for handling some docker related functionality that\n    # we need.\n    command = [\n        'gcloud', 'compute', '--project', project, 'instance-templates',\n        'create-with-container', template_name, '--no-address',\n        '--image-family=cos-stable', '--image-project=cos-cloud',\n        f'--region={zone}', '--scopes=cloud-platform',\n        f'--machine-type={MEASURER_WORKER_MACHINE_TYPE}',\n        f'--boot-disk-size={MEASURER_WORKER_BOOT_DISK_SIZE}', '--preemptible',\n        '--container-image', docker_image\n    ]\n    for item in env.items():\n        command.extend(['--container-env', f'{item[0]}={item[1]}'])\n    new_process.execute(command)\n    return posixpath.join('https://www.googleapis.com/compute/v1/projects/',\n                          project, 'global', 'instanceTemplates', template_name)\n\n\ndef delete_instance_template(template_name: str):\n    \"\"\"Returns a ProcessResult from running the command to delete the\n    measure_worker template for this |experiment|.\"\"\"\n    command = [\n        'gcloud', 'compute', 'instance-templates', 'delete', template_name\n    ]\n    return new_process.execute(command)\n\n\ndef get_account():\n    \"\"\"Returns the email address of the current account being used.\"\"\"\n    return new_process.execute(['gcloud', 'config', 'get-value',\n                                'account']).output.strip()\n", "path": "common/gcloud.py"}], "after_files": [{"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Google cloud related code.\"\"\"\n\nimport enum\nimport posixpath\nimport subprocess\nfrom typing import List, Optional\n\nfrom common import experiment_utils\nfrom common import logs\nfrom common import new_process\n\n# Constants for dispatcher specs.\nDISPATCHER_MACHINE_TYPE = 'n1-highmem-96'\nDISPATCHER_BOOT_DISK_SIZE = '4TB'\nDISPATCHER_BOOT_DISK_TYPE = 'pd-ssd'\n\n# Constants for runner specs.\nRUNNER_BOOT_DISK_SIZE = '200GB'\n\n# Constants for measurer worker specs.\nMEASURER_WORKER_MACHINE_TYPE = 'n1-standard-1'\nMEASURER_WORKER_BOOT_DISK_SIZE = '50GB'\n\n# Number of instances to process at once.\nINSTANCE_BATCH_SIZE = 100\n\n\nclass InstanceType(enum.Enum):\n    \"\"\"Types of instances we need for the experiment.\"\"\"\n    DISPATCHER = 0\n    RUNNER = 1\n\n\ndef create_instance(instance_name: str,\n                    instance_type: InstanceType,\n                    config: dict,\n                    startup_script: Optional[str] = None,\n                    preemptible: bool = False,\n                    **kwargs) -> bool:\n    \"\"\"Creates a GCE instance with name, |instance_name|, type, |instance_type|\n    and with optionally provided and |startup_script|.\"\"\"\n\n    if experiment_utils.is_local_experiment():\n        return run_local_instance(startup_script)\n\n    command = [\n        'gcloud',\n        'compute',\n        'instances',\n        'create',\n        instance_name,\n        '--image-family=cos-stable',\n        '--image-project=cos-cloud',\n        f'--zone={config[\"cloud_compute_zone\"]}',\n        '--scopes=cloud-platform',\n    ]\n    if instance_type == InstanceType.DISPATCHER:\n        command.extend([\n            f'--machine-type={DISPATCHER_MACHINE_TYPE}',\n            f'--boot-disk-size={DISPATCHER_BOOT_DISK_SIZE}',\n            f'--boot-disk-type={DISPATCHER_BOOT_DISK_TYPE}',\n        ])\n    else:\n        machine_type = config['runner_machine_type']\n        if machine_type is not None:\n            command.append(f'--machine-type={machine_type}')\n        else:\n            # Do this to support KLEE experiments.\n            command.append([\n                f'--custom-memory={config[\"runner_memory\"]}',\n                f'--custom-cpu={config[\"runner_num_cpu_cores\"]}',\n            ])\n\n        command.extend([\n            '--no-address',\n            f'--boot-disk-size={RUNNER_BOOT_DISK_SIZE}',\n        ])\n\n    if preemptible:\n        command.append('--preemptible')\n    if startup_script:\n        command.extend(\n            ['--metadata-from-file', f'startup-script={startup_script}'])\n\n    result = new_process.execute(command, expect_zero=False, **kwargs)\n    if result.retcode == 0:\n        return True\n\n    logs.info('Failed to create instance. Command: %s failed. Output: %s',\n              command, result.output)\n    return False\n\n\ndef delete_instances(instance_names: List[str], zone: str, **kwargs) -> bool:\n    \"\"\"Delete gcloud instance |instance_names|. Returns true if the operation\n    succeeded or false otherwise.\"\"\"\n    error_occurred = False\n    # Delete instances in batches, otherwise we run into rate limit errors.\n    for idx in range(0, len(instance_names), INSTANCE_BATCH_SIZE):\n        # -q is needed otherwise gcloud will prompt \"Y/N?\".\n        command = ['gcloud', 'compute', 'instances', 'delete', '-q']\n        command.extend(instance_names[idx:idx + INSTANCE_BATCH_SIZE])\n        command.extend(['--zone', zone])\n        result = new_process.execute(command, expect_zero=False, **kwargs)\n        error_occurred = error_occurred or result.retcode != 0\n\n    return not error_occurred\n\n\ndef set_default_project(cloud_project: str):\n    \"\"\"Set default project for future gcloud and gsutil commands.\"\"\"\n    return new_process.execute(\n        ['gcloud', 'config', 'set', 'project', cloud_project])\n\n\ndef run_local_instance(startup_script: Optional[str] = None) -> bool:\n    \"\"\"Does the equivalent of \"create_instance\" for local experiments, runs\n    |startup_script| in the background.\"\"\"\n    command = ['/bin/bash', startup_script]\n    # pylint: disable=consider-using-with\n    subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n    return True\n\n\ndef create_instance_template(template_name, docker_image, env, project, zone):\n    \"\"\"Returns a ProcessResult from running the command to create an instance\n    template.\"\"\"\n    # Creating an instance template cannot be done using the GCE API because\n    # there is no public API for handling some docker related functionality that\n    # we need.\n    command = [\n        'gcloud', 'compute', '--project', project, 'instance-templates',\n        'create-with-container', template_name, '--no-address',\n        '--image-family=cos-stable', '--image-project=cos-cloud',\n        f'--region={zone}', '--scopes=cloud-platform',\n        f'--machine-type={MEASURER_WORKER_MACHINE_TYPE}',\n        f'--boot-disk-size={MEASURER_WORKER_BOOT_DISK_SIZE}', '--preemptible',\n        '--container-image', docker_image\n    ]\n    for item in env.items():\n        command.extend(['--container-env', f'{item[0]}={item[1]}'])\n    new_process.execute(command)\n    return posixpath.join('https://www.googleapis.com/compute/v1/projects/',\n                          project, 'global', 'instanceTemplates', template_name)\n\n\ndef delete_instance_template(template_name: str):\n    \"\"\"Returns a ProcessResult from running the command to delete the\n    measure_worker template for this |experiment|.\"\"\"\n    command = [\n        'gcloud', 'compute', 'instance-templates', 'delete', template_name\n    ]\n    return new_process.execute(command)\n\n\ndef get_account():\n    \"\"\"Returns the email address of the current account being used.\"\"\"\n    return new_process.execute(['gcloud', 'config', 'get-value',\n                                'account']).output.strip()\n", "path": "common/gcloud.py"}]}