Closed skoulouzis closed 1 month ago
If we remove libgcc build is successful:
FROM ghcr.io/qcdis/naavre/naavre-cell-build-python:v0.17 AS build
RUN micromamba list -n base | grep libgcc
RUN micromamba list -n venv | grep libgcc
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml .
RUN micromamba install -y -n venv -f environment.yaml
RUN micromamba remove -y -n venv libgcc
ARG MAMBA_DOCKERFILE_ACTIVATE=1
USER root
RUN conda-pack -p /opt/conda/envs/venv -o /tmp/env.tar && \
mkdir /venv && cd /venv && tar xf /tmp/env.tar && \
rm /tmp/env.tar
RUN /venv/bin/conda-unpack
FROM jupyter/base-notebook AS runtime
COPY --from=build /venv /venv
WORKDIR /app
COPY . .
To get the libgcc version installed on the ghcr.io/qcdis/naavre/naavre-cell-build-python:v0.17 we run:
docker run -it ghcr.io/qcdis/naavre/naavre-cell-build-python:v0.17 /bin/bash
In the ghcr.io/qcdis/naavre/naavre-cell-build-python:v0.17:
micromamba activate venv
micromamba list | grep libgcc
_libgcc_mutex 0.1 conda_forge conda-forge
libgcc-ng 14.1.0 h77fa898_0 conda-forge
After installing rasterio:
micromamba list | grep libgcc
_libgcc_mutex 0.1 conda_forge conda-forge
libgcc 14.1.0 h77fa898_1 conda-forge
libgcc-ng 14.1.0 h69a702a_1 conda-forge
Running :
docker run -it mambaorg/micromamba:1.5.6 /bin/bash
In mambaorg/micromamba:1.5.6 Install git:
micromamba create -n venv
micromamba activate venv
micromamba install -c conda-forge git
Get libgcc
micromamba list | grep libgcc
_libgcc_mutex 0.1 conda_forge conda-forge
libgcc 14.1.0 h77fa898_1 conda-forge
libgcc-ng 14.1.0 h69a702a_1 conda-forge
Install rasterio:
micromamba install -c conda-forge rasterio
micromamba list | grep libgcc
_libgcc_mutex 0.1 conda_forge conda-forge
libgcc 14.1.0 h77fa898_1 conda-forge
libgcc-ng 14.1.0 h69a702a_1 conda-forge
Fixed by re-building the base images
Using this Dockerfile (tryed all versions of naavre-cell-build-python: v0.17, v0.11,v0.5,v0.2 ):
The environment.yaml:
We get an error:
If we remove rasterio from the environment.yaml the build is successful
However, if we use the ghcr.io/qcdis/naavre/naavre-cell-build-python base docker together:
with the p-environment.yaml:
the build is successful