Skip to content
Snippets Groups Projects
Commit f3190a57 authored by alex's avatar alex
Browse files

Merge branch 'RAP-165' into 'master'

adjust Docker image to use

See merge request eosc/prefactor3-cwl!26

Former-commit-id: a7b685ec
parents ad50c8c3 6842d0a3
No related branches found
No related tags found
No related merge requests found
Showing
with 34 additions and 52 deletions
FROM lofareosc/lofar-pipeline:latest
USER root
ENV PREFACTOR_VERSION='master' \
PREFACTOR_NAME=prefactor \
LC_ALL=C.UTF-8 \
PREFACTOR_DATA_ROOT=/usr/local/share/prefactor \
PYTHONPATH="/usr/local/bin:${PYTHONPATH}"
RUN apt update && apt install -y vim wget casacore-tools && rm -rf /var/cache/apt
RUN pip3 install --upgrade pip && pip3 install --upgrade numpy scipy
COPY prefactor/scripts/* /opt/lofar/scripts/
COPY prefactor/skymodels/* /data/skymodels/
COPY prefactor/rfistrategies/* /data/rfistrategies/
COPY prefactor/solutions/* /data/solutions/
RUN pip3 install --upgrade pip && \
git clone https://github.com/lofar-astron/prefactor.git ${PREFACTOR_NAME} && \
cd ${PREFACTOR_NAME} && git checkout ${PREFACTOR_VERSION} && git pull && \
pip3 install --upgrade $PWD && cd .. && \
rm -rfv ${PREFACTOR_NAME}
RUN ln -sf /opt/lofar/scripts/* /usr/local/bin/
RUN chmod +rx /usr/local/bin/*
ENV PYTHONPATH="/opt/lofar/scripts:${PYTHONPATH}"
ENTRYPOINT ["/home/lofaruser/.entrypoint"]
USER lofaruser
FROM lofareosc/prefactor
FROM lofareosc/prefactor3-cwl
SHELL ["/bin/bash", "-c"]
ADD L570745_uv_first10.MS.tar.xz /data
ADD skymodels.tar.gz /data/skymodels
#ADD L570745_uv_first10.MS.tar.xz /data
#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/calibration.h5 /data/calibration.h5
ADD test_data/L570745_SB001_uv_MODEL.MS /data/L570745_SB001_uv_MODEL.MS
ADD test_data/L570745_SB001_uv_CORRECTED_DATA.MS /data/L570745_SB001_uv_CORRECTED_DATA.MS
ADD test_data/L570745_SB002_uv_CORRECTED_DATA.MS /data/L570745_SB002_uv_CORRECTED_DATA.MS
ADD test_data/L570745_SB003_uv_CORRECTED_DATA.MS /data/L570745_SB003_uv_CORRECTED_DATA.MS
ADD test_data/calibration.h5 /data/calibration.h5
#! /bin/bash
set -e
git_clone_or_pull () {
REPO=$1
BRANCH=$2
DIR=$3
if [ -d $DIR ]
then
git -C "${DIR}" pull
else
git clone --depth 1 -b "${BRANCH}" "${REPO}" "${DIR}"
fi
}
Prefactor_TAG=production
DOCKER_TAG=latest
# FETCHES Prefactor
git_clone_or_pull https://github.com/lofar-astron/prefactor.git ${Prefactor_TAG} prefactor
SCRIPT_PATH=$(realpath ${BASH_SOURCE[0]})
DOCKER_PATH=$(dirname ${SCRIPT_PATH})
docker build ${DOCKER_PATH} -t lofareosc/prefactor
docker build ${DOCKER_PATH} -f ${DOCKER_PATH}/Dockerfile_ci -t lofareosc/prefactor-ci
docker build ${PWD} -t lofareosc/prefactor3-cwl:${DOCKER_TAG}
docker push lofareosc/prefactor3-cwl:${DOCKER_TAG}
......@@ -13,7 +13,7 @@ requirements:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
baseCommand:
- aoflagger
......
......@@ -36,6 +36,6 @@ hints:
- entry: $(inputs.msin)
writable: true
- class: DockerRequirement
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
- class: InlineJavascriptRequirement
stdout: Ateamclipper.log
......@@ -132,7 +132,7 @@ outputs:
glob: 'DPPP*.log'
hints:
- class: DockerRequirement
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
stdout: DPPP.log
stderr: DPPP_err.log
requirements:
......
......@@ -82,7 +82,7 @@ outputs:
label: H5parm_collector
hints:
- class: DockerRequirement
dockerPull: 'lofareosc/prefactor:HBAcalibrator'
dockerPull: 'lofareosc/prefactor3-cwl'
stdout: $(inputs.outh5parmname)-parm_collector_output.log
stderr: $(inputs.outh5parmname)-parm_collector_output_err.log
requirements:
......
......@@ -31,7 +31,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -32,7 +32,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -32,7 +32,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -31,7 +31,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -33,7 +33,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -33,7 +33,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -32,7 +32,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -34,7 +34,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -35,7 +35,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -31,7 +31,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -32,7 +32,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -40,7 +40,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
......@@ -49,7 +49,7 @@ arguments:
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
dockerPull: lofareosc/prefactor3-cwl
inputs:
- id: input_h5parm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment