Skip to content

Commit

Permalink
Reuse mamba in the activation script
Browse files Browse the repository at this point in the history
  • Loading branch information
jjerphan authored Aug 26, 2024
1 parent 19330b3 commit 4a02cc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions repo2docker/buildpacks/conda/activate-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ done
if [[ "${KERNEL_PYTHON_PREFIX}" != "${NB_PYTHON_PREFIX}" ]]; then
# if the kernel is a separate env, stack them
# so both are on PATH, notebook first
micromamba activate ${KERNEL_PYTHON_PREFIX}
micromamba activate --stack ${NB_PYTHON_PREFIX}
mamba activate ${KERNEL_PYTHON_PREFIX}
mamba activate --stack ${NB_PYTHON_PREFIX}

# even though it's second on $PATH
# make sure CONDA_DEFAULT_ENV is the *kernel* env
Expand All @@ -17,5 +17,5 @@ if [[ "${KERNEL_PYTHON_PREFIX}" != "${NB_PYTHON_PREFIX}" ]]; then
# which only contains UI when the two are different
export CONDA_DEFAULT_ENV="${KERNEL_PYTHON_PREFIX}"
else
micromamba activate ${NB_PYTHON_PREFIX}
mamba activate ${NB_PYTHON_PREFIX}
fi

0 comments on commit 4a02cc3

Please sign in to comment.