From ae134c50da806636f2f8b6c6dbf66c12c0763e04 Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Fri, 28 Apr 2023 17:21:44 -0400 Subject: [PATCH 1/2] Lets keep the script out of the container --- code/opfvta-images/Containerfile | 3 --- code/opfvta-images/Containerfile.base | 9 --------- 2 files changed, 12 deletions(-) delete mode 100644 code/opfvta-images/Containerfile.base diff --git a/code/opfvta-images/Containerfile b/code/opfvta-images/Containerfile index acab7d4d..f2a8fa21 100644 --- a/code/opfvta-images/Containerfile +++ b/code/opfvta-images/Containerfile @@ -30,6 +30,3 @@ RUN echo "sci-biology/opfvta_bidsdata-2.0" > /etc/portage/profile/package.provid RUN pushd /var/db/repos/local_opfvta/sci-misc/opfvta; ebuild opfvta-99999.ebuild manifest; popd RUN emerge -v opfvta --autounmask-continue -RUN source /etc/profile - -ENTRYPOINT ["/opfvta/produce.sh"] diff --git a/code/opfvta-images/Containerfile.base b/code/opfvta-images/Containerfile.base deleted file mode 100644 index 8bdef3dc..00000000 --- a/code/opfvta-images/Containerfile.base +++ /dev/null @@ -1,9 +0,0 @@ -# based on stage3 image -# FROM gentoo/stage3:amd64-hardened-20200905 -FROM gentoo/stage3:latest - -# copy the entire portage volume in -COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo - -RUN emerge -v --noreplace dev-vcs/git -RUN emerge -v1u portage From 474a1c5caf97415c5dd384deb6b3ffce8799974c Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Fri, 28 Apr 2023 17:44:05 -0400 Subject: [PATCH 2/2] cleanup --- Makefile | 19 +++++-------------- code/opfvta-images/Containerfile | 3 +++ code/produce-analysis.sh | 2 ++ 3 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 code/produce-analysis.sh diff --git a/Makefile b/Makefile index d1bd7069..cd7d67df 100644 --- a/Makefile +++ b/Makefile @@ -26,24 +26,15 @@ push: podman push ${FQDN_IMAGE} run: - # TODO - ifndef OPFVTA_SCRATCH_DIR - $(error OPFVTA_SCRATCH_DIR is not set) - endif + ifeq ($(OPFVTA_SCRATCH_DIR),) + echo "OPFVTA_SCRATCH_DIR must be set to a directory with at least 200Gb of space." + else podman run \ -it \ --rm \ -v inputs/opfvta-bids:/usr/share/opfvta_bidsdata \ -v inputs/mouse-brain-templates-0.5.3:/usr/share/mouse_brain_atlases \ + -v outputs/:/outputs -v ${OPFVTA_SCRATCH_DIR}:/root/.scratch ${FQDN_IMAGE} - -# Use this to run a shell -handtest: - podman run \ - -it \ - -v input_data:/usr/share/opfvta_bidsdata \ - -v reference_data:/TODOWHEREDOESTHISGO \ - -v output:/root/.scratch \ - ${FQDN_IMAGE} \ - /bin/bash + endif diff --git a/code/opfvta-images/Containerfile b/code/opfvta-images/Containerfile index f2a8fa21..9f76b2c0 100644 --- a/code/opfvta-images/Containerfile +++ b/code/opfvta-images/Containerfile @@ -11,6 +11,9 @@ ARG gentoo_hash=0f6aa0646baad09881e581250e24a4e018e14abc ARG science_hash=3f2aee8f5efbcf9301c98133bf56daaf2767ded6 ARG FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" +# This will be bound, and contents available outside of container +RUN mkdir /outputs + COPY code/opfvta /opfvta COPY code/opfvta/.gentoo/portage/ /etc/portage/ COPY code/opfvta/.gentoo/overlay/ /var/db/repos/local_opfvta/ diff --git a/code/produce-analysis.sh b/code/produce-analysis.sh new file mode 100644 index 00000000..bfa64248 --- /dev/null +++ b/code/produce-analysis.sh @@ -0,0 +1,2 @@ +make data +make all