Skip to content

Commit

Permalink
Set solver right after conda clean ... to avoid incompatible caches (
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast authored Mar 28, 2023
1 parent 659e137 commit 34bec11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion anaconda-pkg-build/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ RUN MC_ARCH="$(uname -m)" \
&& /opt/conda/bin/conda update --all --quiet --yes \
&& /opt/conda/bin/conda install --quiet --yes conda-build conda-libmamba-solver \
&& /opt/conda/bin/conda clean --all --yes \
# The solver has to be set right after the `conda clean` call and before the next
# `conda install` call to avoid incompatible cache formats.
&& /opt/conda/bin/conda config --system --set solver libmamba \
# Cache our C and C++ compilers so we don't have to download them with
# each build; skipping the Fortran compiler as it's not used often
# enough to justify the cache space. Note that we do NOT want to
Expand All @@ -118,7 +121,6 @@ RUN MC_ARCH="$(uname -m)" \
# hadolint ignore=DL3059
RUN rm -fv /opt/conda/.condarc \
&& /opt/conda/bin/conda config --system --set show_channel_urls True \
&& /opt/conda/bin/conda config --system --set solver libmamba \
&& /opt/conda/bin/conda config --system --set add_pip_as_python_dependency False \
&& /opt/conda/bin/conda config --show-sources

Expand Down

0 comments on commit 34bec11

Please sign in to comment.