Skip to content

Add tags for mamba and conda versions #2251

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

Merged
merged 2 commits into from
Mar 12, 2025
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
This changelog only contains breaking and/or significant changes manually introduced to this repository (using Pull Requests).
All image manifests can be found in [the wiki](https://github.com/jupyter/docker-stacks/wiki).

## 2025-03-12

Affected: all images.

- **Non-breaking:** Add `conda` and `mamba` version taggers ([#2251](https://github.com/jupyter/docker-stacks/pull/2251)).

## 2025-02-21

Affected: all images.
Expand Down
4 changes: 4 additions & 0 deletions tagging/hierarchy/images_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
from tagging.taggers.tagger_interface import TaggerInterface
from tagging.taggers.ubuntu_version import UbuntuVersionTagger
from tagging.taggers.versions import (
CondaVersionTagger,
JavaVersionTagger,
JuliaVersionTagger,
JupyterHubVersionTagger,
JupyterLabVersionTagger,
JupyterNotebookVersionTagger,
MambaVersionTagger,
PythonMajorMinorVersionTagger,
PythonVersionTagger,
PytorchVersionTagger,
Expand All @@ -43,6 +45,8 @@ class ImageDescription:
UbuntuVersionTagger(),
PythonMajorMinorVersionTagger(),
PythonVersionTagger(),
MambaVersionTagger(),
CondaVersionTagger(),
],
manifests=[CondaEnvironmentManifest(), AptPackagesManifest()],
),
Expand Down
12 changes: 12 additions & 0 deletions tagging/taggers/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ def tag_value(container: Container) -> str:
return full_version[: full_version.rfind(".")]


class MambaVersionTagger(TaggerInterface):
@staticmethod
def tag_value(container: Container) -> str:
return "mamba-" + _get_program_version(container, "mamba")


class CondaVersionTagger(TaggerInterface):
@staticmethod
def tag_value(container: Container) -> str:
return "conda-" + _get_program_version(container, "conda").split()[1]


class JupyterNotebookVersionTagger(TaggerInterface):
@staticmethod
def tag_value(container: Container) -> str:
Expand Down
Loading