From c812d61ad3241deeff55b5a511ba48d9f98b6302 Mon Sep 17 00:00:00 2001 From: Philip Cook Date: Mon, 29 Jul 2024 11:19:41 -0400 Subject: [PATCH 1/2] CI: Update Dockerfile Trying to understand intermittent GHA failures --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 101c565d..fe563f7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,11 @@ RUN conda update -c defaults conda && \ WORKDIR /usr/local/src COPY environment.yml . -RUN conda env update -n base +RUN echo "CONDA INFO: " && \ + conda info && \ + conda config --show-sources && \ + echo "Updating conda" && \ + conda env update -n base COPY . . # number of parallel make jobs From 56bfccf0c7058c01c7a7e78baa4b1d9f84cc66ba Mon Sep 17 00:00:00 2001 From: Philip A Cook Date: Mon, 29 Jul 2024 14:10:39 -0400 Subject: [PATCH 2/2] ENH: Activate conda env --- Dockerfile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index fe563f7a..6e1d2739 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Note: QEMU emulated ppc64le build might take ~6 hours # Use conda to resolve dependencies cross-platform -FROM debian:bookworm-slim as builder +FROM debian:bookworm as builder # install libpng to system for cross-architecture support # https://github.com/ANTsX/ANTs/issues/1069#issuecomment-681131938 @@ -22,24 +22,26 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py310_23.11.0-1- && rm Miniconda3-py310_23.11.0-1-Linux-$(uname -m).sh ENV PATH=/opt/conda/bin:$PATH -# install cmake binary using conda for multi-arch support -# apt install fails because libssl1.0.0 is not available for newer Debian -RUN conda update -c defaults conda && \ - conda install -c conda-forge cmake && \ - conda config --set solver classic - WORKDIR /usr/local/src + COPY environment.yml . -RUN echo "CONDA INFO: " && \ + +# Activate the base environment and update it +RUN . /opt/conda/etc/profile.d/conda.sh && \ + conda activate base && \ conda info && \ conda config --show-sources && \ echo "Updating conda" && \ - conda env update -n base + conda env update -n base && \ + echo "installing cmake" && \ + conda install -c conda-forge cmake + COPY . . # number of parallel make jobs ARG j=2 -RUN pip --no-cache-dir -v install . +RUN . /opt/conda/etc/profile.d/conda.sh && \ + pip --no-cache-dir -v install . # run tests RUN bash tests/run_tests.sh