Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Apr 21, 2018
1 parent de3789f commit 87f6b0f
Showing 1 changed file with 18 additions and 30 deletions.
48 changes: 18 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,36 +42,24 @@ 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 " 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 && \
/usr/share/docker/entrypoint.sh \
/usr/share/docker/entrypoint_2.sh \
/usr/share/docker/entrypoint_3.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 87f6b0f

Please sign in to comment.