diff --git a/Docker/Dockerfile b/Docker/Dockerfile index e72582ecc14d3b22def4f77c2c8f95fb44c4f4c7..bb0ab0e78717c002ba49d775ea31b115ccaa7f9a 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -98,7 +98,7 @@ ARG LoSoTo_TAG=master LABEL LoSoTo.version.tag=${LoSoTo_TAG} RUN apt-get update && apt-get install -y nodejs python3-pip git wsclean -RUN python3 -m pip install cwltool cwl-runner -e "git://github.com/darafferty/LSMTool.git@${LSMTool_TAG}#egg=LSMTool" toil[cwl]==${TOIL_VERSION} +RUN python3 -m pip install cwltool cwl-runner -e "git://github.com/darafferty/LSMTool.git@${LSMTool_TAG}#egg=LSMTool" "toil[cwl]"==${TOIL_VERSION} RUN python3 -m pip install -e "git+https://github.com/revoltek/losoto.git@${LoSoTo_TAG}#egg=LoSoTo" @@ -107,7 +107,8 @@ ADD skymodels.tar.gz /data/skymodels ADD test_data/A-Team_lowres.sourcedb /data/A-Team_lowres.sourcedb ADD test_data/example.h5 /data/example.h5 ADD test_data/L570745_SB001_uv_MODEL.MS /data/L570745_SB001_uv_MODEL.MS - +ADD losoto.patch /home/lofaruser/losoto.patch +RUN patch /src/losoto/losoto/operations/__init__.py /home/lofaruser/losoto.patch ADD .entrypoint /home/lofaruser/.entrypoint RUN chown lofaruser:lofaruser /home/lofaruser/.entrypoint && \ chmod +rx /home/lofaruser/.entrypoint diff --git a/Docker/build_docker.sh b/Docker/build_docker.sh index e39c94963ca43d00b07b69aa10c0f4095c144eaf..d8c91fb8986de3e73be754691f1ba173b1322918 100755 --- a/Docker/build_docker.sh +++ b/Docker/build_docker.sh @@ -6,7 +6,7 @@ git_clone_or_pull () { BRANCH=$2 DIR=$3 - git clone --single-branch -b "${BRANCH}" "${REPO}" "${DIR}" 2> /dev/null || git -C "${DIR}" pull + git clone --depth 1 -b "${BRANCH}" "${REPO}" "${DIR}" 2> /dev/null || git -C "${DIR}" pull } # SOFTWARE VERSIONS diff --git a/Docker/losoto.patch b/Docker/losoto.patch new file mode 100644 index 0000000000000000000000000000000000000000..fbdfb47754296d2b358e162afe777cd1e41fea75 --- /dev/null +++ b/Docker/losoto.patch @@ -0,0 +1,13 @@ +--- /src/losoto/losoto/operations/__init__.py 2019-11-07 12:43:46.220577945 +0000 ++++ /src/losoto/losoto/operations/__init__.py 2019-11-07 12:43:34.401765786 +0000 +@@ -2,8 +2,7 @@ + + __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py") if f[0] != '_'] + +-for x in __all__: +- __import__(x, locals(), globals()) ++from . import * + + class Timer(object): + """ +