Skip to content

Commit

Permalink
Move config reset _before_ all conda config --set calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast committed Mar 28, 2023
1 parent 34bec11 commit 3ce7782
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions anaconda-pkg-build/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ 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 \
&& rm -fv /opt/conda/.condarc \
&& /opt/conda/bin/conda config --system --set show_channel_urls True \
&& /opt/conda/bin/conda config --system --set add_pip_as_python_dependency False \
&& /opt/conda/bin/conda config --show-sources \
# 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 \
Expand All @@ -118,12 +122,6 @@ RUN MC_ARCH="$(uname -m)" \
&& /opt/conda/bin/conda install --download-only --quiet --yes \
"gcc_linux-$subdir=${GCC_VER}" "gxx_linux-$subdir=${GCC_VER}"

# 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 add_pip_as_python_dependency False \
&& /opt/conda/bin/conda config --show-sources

ENV PATH="/opt/conda/bin:${PATH}"

CMD [ "/bin/bash" ]

0 comments on commit 3ce7782

Please sign in to comment.