diff --git a/docker/Dockerfile b/docker/Dockerfile index da8bf30e..d23b8a3f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -36,9 +36,8 @@ WORKDIR /tmp FROM base AS matpower_local ONBUILD ARG MP_SRC ONBUILD ARG BRANCH -# ONBUILD COPY docker/matpower_docker_tests/matpower_docker_tests_8.sh /usr/local/bin/matpower_docker_tests.sh +ONBUILD COPY ./docker/matpower_docker_tests/matpower_docker_tests_8.sh /usr/local/bin/matpower_docker_tests.sh ONBUILD COPY . $HOME/packages/matpower -ONBUILD RUN ls -al $HOME/packages/matpower ONBUILD RUN git clone -b ${BRANCH} --depth=1 https://github.com/MATPOWER/matpower-extras.git $HOME/packages/matpower/extras && \ rm -rf $HOME/packages/matpower/extras/.git && \ octave-cli --no-gui -p $HOME/packages/matpower --eval "install_matpower(1,1,1)" @@ -47,7 +46,7 @@ ONBUILD RUN git clone -b ${BRANCH} --depth=1 https://github.com/MATPOWER/matpowe FROM base AS matpower_github ONBUILD ARG MP_SRC ONBUILD ARG BRANCH -ONBUILD COPY docker/matpower_docker_tests/matpower_docker_tests_8.sh /usr/local/bin/matpower_docker_tests.sh +ONBUILD COPY ./docker/matpower_docker_tests/matpower_docker_tests_8.sh /usr/local/bin/matpower_docker_tests.sh ONBUILD RUN git clone -b ${BRANCH} --depth=1 https://github.com/MATPOWER/matpower.git $HOME/packages/matpower && \ git clone -b ${BRANCH} --depth=1 https://github.com/MATPOWER/matpower-extras.git $HOME/packages/matpower/extras && \ rm -rf $HOME/packages/matpower/.git && \ @@ -57,16 +56,16 @@ ONBUILD RUN git clone -b ${BRANCH} --depth=1 https://github.com/MATPOWER/matpowe # Select source for MATPOWER files FROM matpower_${MP_SRC} AS matpower -# # conditionally disable a warning in .octaverc (for Octave 6.x+ and MATPOWER 7.0) -# FROM matpower AS warn_0 -# FROM matpower AS warn_1 -# ONBUILD RUN echo "warning('off', 'Octave:empty-index');" >> $HOME/.octaverc -# FROM warn_${WARN} as warn -# -# FROM warn AS patch_0 -# FROM warn AS patch_1 -# ONBUILD COPY docker/patches/t_most_mpopf.patch $HOME/packages/ -# ONBUILD RUN patch -u -b $HOME/packages/matpower/most/lib/t/t_most_mpopf.m -i $HOME/packages/t_most_mpopf.patch -# FROM patch_${PATCH_MOST_TEST} +# conditionally disable a warning in .octaverc (for Octave 6.x+ and MATPOWER 7.0) +FROM matpower AS warn_0 +FROM matpower AS warn_1 +ONBUILD RUN echo "warning('off', 'Octave:empty-index');" >> $HOME/.octaverc +FROM warn_${WARN} as warn + +FROM warn AS patch_0 +FROM warn AS patch_1 +ONBUILD COPY ./docker/patches/t_most_mpopf.patch $HOME/packages/ +ONBUILD RUN patch -u -b $HOME/packages/matpower/most/lib/t/t_most_mpopf.m -i $HOME/packages/t_most_mpopf.patch +FROM patch_${PATCH_MOST_TEST} WORKDIR "${HOME}"