Skip to content

Commit

Permalink
Make create-env tests verbose and smaller
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Bargull <[email protected]>
  • Loading branch information
mbargull committed Oct 17, 2023
1 parent a8f1636 commit 2faa88e
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions images/create-env/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,55 +1,61 @@
ARG base

FROM "${base}"
RUN CONDA_PKGS_DIRS="/tmp/pkgs" \
RUN set -x && \
CONDA_PKGS_DIRS="/tmp/pkgs" \
/opt/create-env/env-execute \
create-env \
--conda=mamba \
/usr/local \
file findutils
RUN . /usr/local/env-activate.sh && \
file findutils grep
RUN set -x && \
. /usr/local/env-activate.sh && \
if find /opt/create-env \
-xdev \
-type f \
-exec file {} \+ \
2> /dev/null \
| grep 'not stripped' \
; then \
>&2 printf 'found unstripped binaries\n' ; exit 1 \
; fi
RUN . /usr/local/env-activate.sh && \
RUN set -x && \
. /usr/local/env-activate.sh && \
if find /opt/create-env \
-xdev \
-type f \
-name \*.a \
2> /dev/null \
| grep . \
; then \
>&2 printf 'found static libraries\n' ; exit 1 \
; fi


FROM "${base}" as build_bioconda_utils
RUN /opt/create-env/env-execute \
FROM "${base}" as build_bioconda_package
RUN set -x && \
/opt/create-env/env-execute \
create-env \
--conda=mamba \
--strip-files=\* \
/usr/local \
bioconda-utils
bedtools
FROM bioconda/base-glibc-busybox-bash
COPY --from=build_bioconda_utils /usr/local /usr/local
RUN /usr/local/env-execute \
bioconda-utils --version \
COPY --from=build_bioconda_package /usr/local /usr/local
RUN set -x && \
/usr/local/env-execute \
bedtools --version \
&& \
[ ! "${CONDA_PREFIX}" = /usr/local ] \
&& \
{ set -x && . /usr/local/env-activate.sh && set +x ; } \
&& \
[ "${CONDA_PREFIX}" = /usr/local ] \
&& \
bioconda-utils --version
bedtools --version


FROM "${base}" as build_conda
RUN /opt/create-env/env-execute \
RUN set -x && \
/opt/create-env/env-execute \
create-env \
--conda=mamba \
--env-activate-args='--prefix-is-base' \
Expand All @@ -61,7 +67,8 @@ RUN /opt/create-env/env-execute \
FROM bioconda/base-glibc-busybox-bash
COPY --from=build_conda /opt/conda /opt/conda
COPY --from=build_conda /opt/conda/env-activate.sh /usr/local/
RUN /usr/local/env-execute \
RUN set -x && \
/usr/local/env-execute \
conda info --all \
&& \
{ set -x && . /usr/local/env-activate.sh && set +x ; } \
Expand Down

0 comments on commit 2faa88e

Please sign in to comment.