Add guard into container py script
@@ -372,14 +372,15 @@ import json
from spikeinterface import load_extractor
from spikeinterface.sorters import run_sorter_local
-# load recording in docker
+if __name__ == '__main__':
+ # load recording in container
recording = load_extractor('{parent_folder_unix}/in_container_recording.json')
-# load params in docker
+ # load params in container
with open('{parent_folder_unix}/in_container_params.json', encoding='utf8', mode='r') as f:
sorter_params = json.load(f)
-# run in docker
+ # run in container
output_folder = '{output_folder_unix}'
run_sorter_local('{sorter_name}', recording, output_folder=output_folder,
remove_existing_folder={remove_existing_folder}, delete_output_folder=False,
