Skip to content

Commit

Permalink
Rewrite test phase without wrapper script
Browse files Browse the repository at this point in the history
Now that the entrypoint scripts are included around the test runner
step, there is no need to have a temporary testing script written out to
pass to these entrypoint scripts. So rewrite the testing phase to live
in a simple `RUN` step without the testing wrapper script.
  • Loading branch information
jakirkham committed Apr 21, 2018
1 parent 77774e1 commit a0dfc87
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,23 @@ RUN for PYTHON_VERSION in 2 3; do \

ENV OPENBLAS_NUM_THREADS=1

RUN rm -f /tmp/test.sh && \
touch /tmp/test.sh && \
chmod +x /tmp/test.sh && \
echo -e '#!/bin/bash' >> /tmp/test.sh && \
echo -e "" >> /tmp/test.sh && \
echo -e "set -e" >> /tmp/test.sh && \
echo -e "" >> /tmp/test.sh && \
echo -e "export CORES=2" >> /tmp/test.sh && \
echo -e "" >> /tmp/test.sh && \
echo -e "for PYTHON_VERSION in 2 3; do" >> /tmp/test.sh && \
echo -e " . /opt/conda${PYTHON_VERSION}/etc/profile.d/conda.sh && " >> /tmp/test.sh && \
echo -e " conda activate base && " >> /tmp/test.sh && \
echo -e " cd /nanshe_workflow && " >> /tmp/test.sh && \
echo -e " /usr/share/docker/entrypoint.sh /usr/share/docker/entrypoint_2.sh /usr/share/docker/entrypoint_3.sh python${PYTHON_VERSION} setup.py test && " >> /tmp/test.sh && \
echo -e " (qdel -f -u root || true) && " >> /tmp/test.sh && \
echo -e " qstat && " >> /tmp/test.sh && \
echo -e " service sge_execd stop && " >> /tmp/test.sh && \
echo -e " service sgemaster stop && " >> /tmp/test.sh && \
echo -e " git clean -fdx && " >> /tmp/test.sh && \
echo -e " rm -rf ~/ipcontroller.o* && " >> /tmp/test.sh && \
echo -e " rm -rf ~/ipcontroller.e* && " >> /tmp/test.sh && \
echo -e " rm -rf ~/ipengine.o* && " >> /tmp/test.sh && \
echo -e " rm -rf ~/ipengine.e* && " >> /tmp/test.sh && \
echo -e " conda deactivate ; " >> /tmp/test.sh && \
echo -e "done" >> /tmp/test.sh && \
/tmp/test.sh && \
rm /tmp/test.sh
RUN export CORES=2 \
for PYTHON_VERSION in 2 3; do \
. /opt/conda/etc/profile.d/conda.sh && \
conda activate base && \
cd /nanshe_workflow && \
/usr/share/docker/entrypoint.sh /usr/share/docker/entrypoint_2.sh python setup.py test && \
(qdel -f -u root || true) && \
qstat && \
service sge_execd stop && \
service sgemaster stop && \
git clean -fdx && \
rm -rf ~/ipcontroller.o* && \
rm -rf ~/ipcontroller.e* && \
rm -rf ~/ipengine.o* && \
rm -rf ~/ipengine.e* && \
conda deactivate ; \
done

WORKDIR /nanshe_workflow
ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/usr/share/docker/entrypoint.sh", "/usr/share/docker/entrypoint_2.sh", "/usr/share/docker/entrypoint_3.sh", "python3", "-m", "notebook", "--allow-root", "--no-browser", "--ip=*" ]

0 comments on commit a0dfc87

Please sign in to comment.