Repository: google/fuzzbench

Issue:
remove `shared_volume` for local running
`shared_volume` can be removed by using `experiment_filestore`. And in this way, it will have one less shared folder for docker running.
remove `shared_volume` for local running
`shared_volume` can be removed by using `experiment_filestore`. And in this way, it will have one less shared folder for docker running.


Discussion:

Resolving patch:
diff --git a/experiment/build/local_build.py b/experiment/build/local_build.py
--- a/experiment/build/local_build.py
+++ b/experiment/build/local_build.py
@@ -15,17 +15,14 @@
 """Module for building things on Google Cloud Build for use in trials."""
 
 import os
-import posixpath
 from typing import Tuple
 
 from common import benchmark_utils
 from common import environment
-from common import experiment_path as exp_path
-from common import filestore_utils
+from common import experiment_utils
 from common import logs
 from common import new_process
 from common import utils
-from experiment.build import build_utils
 
 logger = logs.Logger('builder')  # pylint: disable=invalid-name
 
@@ -43,8 +40,8 @@ def build_base_images() -> Tuple[int, str]:
 
 def get_shared_coverage_binaries_dir():
     """Returns the shared coverage binaries directory."""
-    shared_volume = os.environ['SHARED_VOLUME']
-    return os.path.join(shared_volume, 'coverage-binaries')
+    experiment_filestore_path = experiment_utils.get_experiment_filestore_path()
+    return os.path.join(experiment_filestore_path, 'coverage-binaries')
 
 
 def make_shared_coverage_binaries_dir():
@@ -77,16 +74,10 @@ def copy_coverage_binaries(benchmark):
         shared_coverage_binaries_dir, coverage_build_archive)
     command = 'cd /out; tar -czvf {} *'.format(
         coverage_build_archive_shared_dir_path)
-    new_process.execute([
+    return new_process.execute([
         'docker', 'run', '-v', mount_arg, builder_image_url, '/bin/bash', '-c',
         command
     ])
-    coverage_binaries_dir = build_utils.get_coverage_binaries_dir()
-    coverage_build_archive_gcs_path = posixpath.join(
-        exp_path.filestore(coverage_binaries_dir), coverage_build_archive)
-
-    return filestore_utils.cp(coverage_build_archive_shared_dir_path,
-                              coverage_build_archive_gcs_path)
 
 
 def build_fuzzer_benchmark(fuzzer: str, benchmark: str) -> bool:
diff --git a/experiment/run_experiment.py b/experiment/run_experiment.py
--- a/experiment/run_experiment.py
+++ b/experiment/run_experiment.py
@@ -334,13 +334,11 @@ def create_async(self):
 
     def start(self):
         """Start the experiment on the dispatcher."""
-        shared_volume_dir = os.path.abspath('shared-volume')
-        if not os.path.exists(shared_volume_dir):
-            os.mkdir(shared_volume_dir)
-        shared_volume_volume_arg = '{0}:{0}'.format(shared_volume_dir)
-        shared_volume_env_arg = 'SHARED_VOLUME={}'.format(shared_volume_dir)
+        experiment_filestore_path = os.path.abspath(
+            self.config['experiment_filestore'])
+        filesystem.create_directory(experiment_filestore_path)
         sql_database_arg = 'SQL_DATABASE_URL=sqlite:///{}'.format(
-            os.path.join(shared_volume_dir, 'local.db'))
+            os.path.join(experiment_filestore_path, 'local.db'))
 
         base_docker_tag = experiment_utils.get_base_docker_tag(
             self.config['cloud_project'])
@@ -370,14 +368,10 @@ def start(self):
             '-v',
             '/var/run/docker.sock:/var/run/docker.sock',
             '-v',
-            shared_volume_volume_arg,
-            '-v',
             shared_experiment_filestore_arg,
             '-v',
             shared_report_filestore_arg,
             '-e',
-            shared_volume_env_arg,
-            '-e',
             set_instance_name_arg,
             '-e',
             set_experiment_arg,


Test patch: