Commit 640fb3a6 authored by Carina Lansing's avatar Carina Lansing
Browse files

Updated the entrypoint script so that it will copy the embedded lasso input...

Updated the entrypoint script so that it will copy the embedded lasso input files to the outputs folder so they can be used in the jupyter notebooks.
parent fe04b8e5
......@@ -7,11 +7,12 @@ import os
import re
import pathlib
import subprocess
import shutil
# Global parameters
data_home = '/data/lasso'
input_dir = f'{data_home}/inputs' # should map to collections/sgp folder on host
output_dir = f'{data_home}/outputs' # can map to any folder on host
input_dir = f'{data_home}/inputs' # should mount to collections/sgp folder on host
output_dir = f'{data_home}/outputs' # should mount to any folder on host
collection_dir = f'{data_home}/collection/sgp'
datastream_dir = f'{data_home}/datastream/sgp'
......@@ -47,6 +48,14 @@ def get_sim_numbers():
return sim_numbers
def copy_builtin_data(datastream_name):
source = os.path.join(datastream_dir, datastream_name)
dest = os.path.join(output_dir, datastream_name)
# Copy the content of source to destination
destination = shutil.copytree(source, dest)
def create_sym_link(source_file, linked_file):
if not os.path.exists(linked_file):
# Make a symbolic link
......@@ -199,6 +208,12 @@ def main():
run_lassoscorez()
run_lassoscore()
# Finally, we have to copy the built-in datasets to the outputs folder so that the user can use them
# in the jupyter notebooks after the container has finished
copy_builtin_data('sgpcldfracset01mC1.c1')
copy_builtin_data('sgpcldfracset15mC1.c1')
copy_builtin_data('sgplassodiagobsC1.c1')
if __name__ == "__main__":
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment