diff --git a/stimela/__init__.py b/stimela/__init__.py index 4c0aad01..a428f53f 100644 --- a/stimela/__init__.py +++ b/stimela/__init__.py @@ -47,12 +47,11 @@ def register_globals(): try: # These files must exist for a cab image to be valid ls_cabdir = os.listdir('{0}/{1}'.format(CAB_PATH, item)) - dockerfile = 'Dockerfile' in ls_cabdir paramfile = 'parameters.json' in ls_cabdir srcdir = 'src' in ls_cabdir except OSError: continue - if dockerfile and paramfile and srcdir: + if paramfile and srcdir: CAB.append(item) diff --git a/stimela/cargo/base/ragavi/Dockerfile b/stimela/cargo/base/ragavi/Dockerfile index a275406a..a6899d7f 100644 --- a/stimela/cargo/base/ragavi/Dockerfile +++ b/stimela/cargo/base/ragavi/Dockerfile @@ -1,6 +1,8 @@ FROM stimela/base:1.4.6 RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - RUN pip install -U pip setuptools -RUN pip install ragavi +RUN pip install ragavi>=0.3.5 +RUN pip install --force-reinstall -U git+https://github.com/o-smirnov/datashader +RUN pip install -I numpy RUN ragavi-gains -h RUN ragavi-vis -h diff --git a/stimela/cargo/cab/ragavi/parameters.json b/stimela/cargo/cab/ragavi/parameters.json index 590278e0..5dda800c 100644 --- a/stimela/cargo/cab/ragavi/parameters.json +++ b/stimela/cargo/cab/ragavi/parameters.json @@ -1,7 +1,7 @@ { "task": "ragavi", "base": "stimela/ragavi", - "tag": "1.4.6-1", + "tag": "1.4.6-2", "description": "Radio Astronomy Gain and Visibility Inspector", "prefix": "--", "binary": "ragavi-gains", diff --git a/stimela/main.py b/stimela/main.py index 0a02ba11..ef13013d 100644 --- a/stimela/main.py +++ b/stimela/main.py @@ -109,7 +109,10 @@ def info(cabdir, header=False): raise RuntimeError("Cab could not be found at : {}".format(cabdir)) # Get cab info cab_definition = cab.CabDefinition(parameter_file=pfile) - cab_definition.display(header) + if header: + cab_definition.display(header) + + return cab_definition def cabs(argv): @@ -130,10 +133,10 @@ def cabs(argv): args = parser.parse_args(argv) logfile = '{0:s}/{1:s}_stimela_logfile.json'.format( - LOG_HOME, args.build_label) + LOG_HOME, CAB_USERNAME) if args.cab_doc: - name = '{0:s}_cab/{1:s}'.format(args.build_label, args.cab_doc) + name = '{0:s}_cab/{1:s}'.format(CAB_USERNAME, args.cab_doc) cabdir = "{:s}/{:s}".format(stimela.CAB_PATH, args.cab_doc) info(cabdir) @@ -268,7 +271,6 @@ def pull(argv): images_ = [] for cab in args.cab_base or []: - print(cab in CAB) if cab in CAB: filename = "/".join([stimela.CAB_PATH, cab, "parameters.json"]) param = utils.readJson(filename) @@ -292,12 +294,11 @@ def pull(argv): docker.pull(image) log.log_image(image, 'pulled') else: - base = [] - for cab in CAB: - image = "{:s}/{:s}".format(stimela.CAB_PATH, cab) - base.append(utils.get_Dockerfile_base_image(image).split()[-1]) - + for cab_ in CAB: + cabdir = "{:s}/{:s}".format(stimela.CAB_PATH, cab_) + _cab = info(cabdir) + base.append(f"{_cab.base}:{_cab.tag}") base = set(base) for image in base: