diff --git a/containers/jug/setup_detectors.py b/containers/jug/setup_detectors.py index 0ddfa02a3e499b82e725dc3bfb30cd632b67eda3..08fd205fd9ce5e4dbafdea5aa4f4832b325bb57b 100755 --- a/containers/jug/setup_detectors.py +++ b/containers/jug/setup_detectors.py @@ -148,6 +148,16 @@ if __name__ == '__main__': ip_version=ip['version'], branch=branch), file=f) + ## run once inside global prefix to initialize artifacts in /opt/detectors + os.environ['DETECTOR_PATH'] = args.prefix + cmd = f'bash -c \'cd {args.prefix} && source {prefix}/setup.sh && npdet_info print world_z {prefix}/share/{det}/{det}.xml\'' + print(cmd) + os.system(cmd) + ## run once inside specific prefix to initialize artifacts in $DETECTOR_PATH + os.environ['DETECTOR_PATH'] = args.prefix + cmd = f'bash -c \'cd {prefix} && source {prefix}/setup.sh && npdet_info print world_z {prefix}/share/{det}/{det}.xml\'' + print(cmd) + os.system(cmd) print(' --> Symlinking default detector for backward compatibility') full_prefix='{}/{}-{}'.format(args.prefix, default_detector, default_version) cmd = ['ln -sf {full_prefix}/share {short_prefix}',