Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try using libmamba solver for conda packaging #562

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/container_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ ${HOME}/miniconda3/bin/conda create --override-channels -c conda-forge -y -n hex
${HOME}/miniconda3/bin/activate hexrd
${HOME}/miniconda3/bin/conda activate hexrd

# Install the libmamba solver (it is much faster)
${HOME}/miniconda3/bin/conda install -n base -c conda-forge conda-libmamba-solver
${HOME}/miniconda3/bin/conda config --set solver libmamba

# Install conda build and create output directory
${HOME}/miniconda3/bin/conda install --override-channels -c conda-forge conda-build -y
mkdir output
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:

- name: Install build requirements
run: |
# Change default solver to be libmamba, so that it runs much faster
conda install -n base -c conda-forge conda-libmamba-solver
conda config --set solver libmamba

conda activate hexrd
# FIXME: downgrade urllib3 until this issue is fixed:
# https://github.com/Anaconda-Platform/anaconda-client/issues/654
Expand All @@ -58,7 +62,16 @@ jobs:
if: ${{ matrix.config.name != 'Linux' }}
run: |
conda activate hexrd
# For some reason, we need to set this in the environment as well.
# It seems conda build sometimes needs the solver in the environment
# and sometimes in the base environment. I don't know why.
conda install -c conda-forge conda-libmamba-solver
conda config --env --set solver libmamba
mkdir output
# Conda build is ignoring the .condarc for some reason, so we need to
# set this environment variable instead.
# Setting this variable via `env` did not seem to work for some reason.
export CONDA_SOLVER=libmamba
conda build --override-channels -c conda-forge --output-folder output/ conda.recipe/
# This is need to ensure ~/.profile or ~/.bashrc are used so the activate
# command works.
Expand Down
Loading