From 8c5cd5874259896c7527a4238ce525fab763615a Mon Sep 17 00:00:00 2001 From: Aaron Virshup Date: Mon, 22 May 2017 16:59:37 -0700 Subject: [PATCH] Clean up project root and MDT image layers --- DockerMakefiles/Moldesign.yml | 30 +++++++------------ codeship-services.yml | 16 +++++----- codeship-steps.yml | 4 +-- {buildfiles => deployment}/README.md | 0 .../build-env.dockerfile | 0 {buildfiles => deployment}/check_pyversion.py | 0 .../codeship_runtests.sh | 2 +- .../moldesign-complete-cache.dockerfile | 0 .../moldesign-minimal-cache.dockerfile | 0 .../provision_testrunner_image.sh | 0 {buildfiles => deployment}/requirements.txt | 0 .../send_test_status.py | 0 deployment/tokens.crypt | 1 + set_filters.sh => nb-output-filter.sh | 0 tokens.crypt | 1 - 15 files changed, 23 insertions(+), 31 deletions(-) rename {buildfiles => deployment}/README.md (100%) rename {buildfiles => deployment}/build-env.dockerfile (100%) rename {buildfiles => deployment}/check_pyversion.py (100%) rename {buildfiles => deployment}/codeship_runtests.sh (80%) rename {buildfiles => deployment}/moldesign-complete-cache.dockerfile (100%) rename {buildfiles => deployment}/moldesign-minimal-cache.dockerfile (100%) rename {buildfiles => deployment}/provision_testrunner_image.sh (100%) rename {buildfiles => deployment}/requirements.txt (100%) rename {buildfiles => deployment}/send_test_status.py (100%) create mode 100644 deployment/tokens.crypt rename set_filters.sh => nb-output-filter.sh (100%) delete mode 100644 tokens.crypt diff --git a/DockerMakefiles/Moldesign.yml b/DockerMakefiles/Moldesign.yml index 9ee3b6e..98384e3 100644 --- a/DockerMakefiles/Moldesign.yml +++ b/DockerMakefiles/Moldesign.yml @@ -4,19 +4,26 @@ moldesign_requirements: build: | RUN conda install -qy -c omnia parmed biopython -moldesign: +moldesign_minimal: description: Base installation of the MDT library. Built from the current directory. requires: - moldesign_requirements build_directory: ../ build: | - COPY requirements.txt /opt/mdtreqs.txt + COPY requirements.txt /tmp/mdtreqs.txt RUN apt-get update \ && apt-get install -y gcc \ - && pip install -r /opt/mdtreqs.txt + && pip install -r /tmp/mdtreqs.txt COPY . /opt/molecular-design-toolkit RUN pip install -e /opt/molecular-design-toolkit + +moldesign_complete: + description: An image with moldesign and all python dependencies + requires: + - chem_python + - moldesign_minimal + moldesign_notebook: description: A production-ready, fully outfitted jupyter server container requires: @@ -28,12 +35,6 @@ moldesign_notebook: RUN jupyter nbextension enable --python --sys-prefix widgetsnbextension \ && jupyter nbextension enable --python --sys-prefix nbmolviz -moldesign_complete: - description: An image with moldesign and all python dependencies - requires: - - chem_python - - moldesign - moldesign_standalone: description: | @@ -47,14 +48,3 @@ moldesign_standalone: build: | RUN mkdir -p ~/.moldesign \ && echo "engine_type: subprocess" > ~/.moldesign/moldesign.yml - -moldesign_minimal: - description: | - Same as moldesign_notebook, but *without* any dependencies (OpenBabel, OpenMM etc.). - Used for testing remote execution environment - requires: - - notebook - - moldesign - build: | - ENTRYPOINT [] - CMD '' \ No newline at end of file diff --git a/codeship-services.yml b/codeship-services.yml index 218da6c..e645b33 100644 --- a/codeship-services.yml +++ b/codeship-services.yml @@ -1,26 +1,27 @@ docker_make: build: context: . - dockerfile: ./buildfiles/build-env.dockerfile + dockerfile: ./deployment/build-env.dockerfile volumes: - ./tmp/makefiles:/makefiles add_docker: true cached: true publisher: - encrypted_env_file: tokens.crypt + encrypted_env_file: deployment/tokens.crypt build: context: . - dockerfile: ./buildfiles/build-env.dockerfile + dockerfile: ./deployment/build-env.dockerfile add_docker: true volumes: - ./tmp/reports:/opt/reports test_moldesign_minimal: + encrypted_env_file: deployment/tokens.crypt build: - context: ./buildfiles + context: ./deployment dockerfile: moldesign-minimal-cache.dockerfile - cached: true + cached: false # do not cache this! It gets built before the cache is triggered working_dir: /opt/molecular-design-toolkit/moldesign/_tests add_docker: true environment: @@ -29,10 +30,11 @@ test_moldesign_minimal: - ./tmp/reports:/opt/reports test_moldesign_complete: + encrypted_env_file: deployment/tokens.crypt build: - context: ./buildfiles + context: ./deployment dockerfile: moldesign-complete-cache.dockerfile - cached: true + cached: false # do not cache this! It gets built before the cache is triggered working_dir: /opt/molecular-design-toolkit/moldesign/_tests add_docker: true environment: diff --git a/codeship-steps.yml b/codeship-steps.yml index bd7f91d..bcc8a6f 100644 --- a/codeship-steps.yml +++ b/codeship-steps.yml @@ -46,7 +46,7 @@ name: symmol - type: serial steps: - - command: docker-make --tag dev pyscf_build + - command: docker-make --tag dev pyscf name: pyscf - command: docker-make --tag dev moldesign_complete name: mdt_complete @@ -63,7 +63,7 @@ - test_moldesign_minimal - test_moldesign_complete steps: # we test 2 environments: one without tools locally installed, and one with - - command: ../../buildfiles/codeship_runtests.sh + - command: ../../deployment/codeship_runtests.sh # TODO: test the merged versions of PRs; test additional environments sometimes diff --git a/buildfiles/README.md b/deployment/README.md similarity index 100% rename from buildfiles/README.md rename to deployment/README.md diff --git a/buildfiles/build-env.dockerfile b/deployment/build-env.dockerfile similarity index 100% rename from buildfiles/build-env.dockerfile rename to deployment/build-env.dockerfile diff --git a/buildfiles/check_pyversion.py b/deployment/check_pyversion.py similarity index 100% rename from buildfiles/check_pyversion.py rename to deployment/check_pyversion.py diff --git a/buildfiles/codeship_runtests.sh b/deployment/codeship_runtests.sh similarity index 80% rename from buildfiles/codeship_runtests.sh rename to deployment/codeship_runtests.sh index a708dc7..a4faa07 100755 --- a/buildfiles/codeship_runtests.sh +++ b/deployment/codeship_runtests.sh @@ -8,6 +8,6 @@ statline="$(tail -n1 /opt/reports/pytest.${TESTENV}.log)" echo 'Test status:' echo ${statline} -python ../../buildfiles/send_test_status.py ${exitstat} "${statline}" +python ../../deployment/send_test_status.py ${exitstat} "${statline}" exit ${exitstat} diff --git a/buildfiles/moldesign-complete-cache.dockerfile b/deployment/moldesign-complete-cache.dockerfile similarity index 100% rename from buildfiles/moldesign-complete-cache.dockerfile rename to deployment/moldesign-complete-cache.dockerfile diff --git a/buildfiles/moldesign-minimal-cache.dockerfile b/deployment/moldesign-minimal-cache.dockerfile similarity index 100% rename from buildfiles/moldesign-minimal-cache.dockerfile rename to deployment/moldesign-minimal-cache.dockerfile diff --git a/buildfiles/provision_testrunner_image.sh b/deployment/provision_testrunner_image.sh similarity index 100% rename from buildfiles/provision_testrunner_image.sh rename to deployment/provision_testrunner_image.sh diff --git a/buildfiles/requirements.txt b/deployment/requirements.txt similarity index 100% rename from buildfiles/requirements.txt rename to deployment/requirements.txt diff --git a/buildfiles/send_test_status.py b/deployment/send_test_status.py similarity index 100% rename from buildfiles/send_test_status.py rename to deployment/send_test_status.py diff --git a/deployment/tokens.crypt b/deployment/tokens.crypt new file mode 100644 index 0000000..b605d46 --- /dev/null +++ b/deployment/tokens.crypt @@ -0,0 +1 @@ +PGMZqKq9Cqk+45rl14lfqLk3lOHBQdF6us36dluCvADGhpfTNnOrzI1aE+QkotYLFDkskUQTOQQbysHBts/jLxg7RzDYheY3rIakpFbqsxruChwHqibbf05xI+uHp6XGLPNptflO5/fq9NJqwTIV+w7OVLhxJP8PdA7XmXHey8eYp38= \ No newline at end of file diff --git a/set_filters.sh b/nb-output-filter.sh similarity index 100% rename from set_filters.sh rename to nb-output-filter.sh diff --git a/tokens.crypt b/tokens.crypt deleted file mode 100644 index a116745..0000000 --- a/tokens.crypt +++ /dev/null @@ -1 +0,0 @@ -U1+Qr8u8Y+FlIWfDHpmu49FOnJUShFcrfrR3eSKD8nOkC/R74Jny3vPJJb4zde9KLBrY+vcwmaOczkgYjjJeIyzt8RJis0dWciVmj/NbfBdCfn91XuT2UBes+tyiHfEsacZlOrbv+uP78pfqr+CN6hxxCz0a1khsDu835qT8C2PlVLY= \ No newline at end of file