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

Test micromamba 2.0.5.rc0 #2186

Closed
Closed
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
7 changes: 5 additions & 2 deletions images/docker-stacks-foundation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,25 @@ RUN set -x && \
fi && \
# https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#linux-and-macos
wget --progress=dot:giga -O - \
"https://micro.mamba.pm/api/micromamba/linux-${arch}/latest" | tar -xvj bin/micromamba && \
"https://micro.mamba.pm/api/micromamba/linux-${arch}/2.0.5.rc0" | tar -xvj bin/micromamba && \
PYTHON_SPECIFIER="python=${PYTHON_VERSION}" && \
if [[ "${PYTHON_VERSION}" == "default" ]]; then PYTHON_SPECIFIER="python"; fi && \
# Install the packages
./bin/micromamba install \
-c conda-forge \
-c conda-forge/label/mamba_prerelease \
--root-prefix="${CONDA_DIR}" \
--prefix="${CONDA_DIR}" \
--yes \
'jupyter_core' \
'conda' \
'mamba' \
'mamba=2.0.5.rc0' \
"${PYTHON_SPECIFIER}" && \
rm -rf /tmp/bin/ && \
# Pin major.minor version of python
# https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#preventing-packages-from-updating-pinning
mamba list --full-name 'python' | awk 'END{sub("[^.]*$", "*", $2); print $1 " " $2}' >> "${CONDA_DIR}/conda-meta/pinned" && \
echo 'mamba=2.0.5.rc0' >> "${CONDA_DIR}/conda-meta/pinned" && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
Expand Down
16 changes: 12 additions & 4 deletions tests/package_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,19 @@ def requested_packages(self) -> dict[str, set[str]]:
"""Return the requested package (i.e. `mamba install <package>`)"""
if self.requested is None:
LOGGER.info("Grabbing the list of manually requested packages ...")
self.requested = CondaPackageHelper._parse_package_versions(
self._execute_command(
CondaPackageHelper._conda_export_command(from_history=True)
)
# self.requested = CondaPackageHelper._parse_package_versions(
# self._execute_command(
# CondaPackageHelper._conda_export_command(from_history=True)
# )
# )
vers = self._execute_command(["mamba", "--version"])
LOGGER.debug(vers)
env = self._execute_command(
CondaPackageHelper._conda_export_command(from_history=True)
)
LOGGER.debug(env)
self.requested = CondaPackageHelper._parse_package_versions(env)
LOGGER.debug(self.requested)
return self.requested

def _execute_command(self, command: list[str]) -> str:
Expand Down
Loading