diff --git a/Dockerfile b/Dockerfile index 96caa24..8690e67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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=*" ]