Skip to content

Commit

Permalink
set CONDA_OVERRIDE_GLIBC by default (#2177)
Browse files Browse the repository at this point in the history
* set CONDA_OVERRIDE_GLIBC by default

* clean up
  • Loading branch information
savingoyal authored Dec 13, 2024
1 parent 12b6869 commit 883365d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions metaflow/plugins/pypi/micromamba.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def __init__(self, error):
super(MicromambaException, self).__init__(msg)


GLIBC_VERSION = os.environ.get("CONDA_OVERRIDE_GLIBC", "2.38")


class Micromamba(object):
def __init__(self, logger=None):
# micromamba is a tiny version of the mamba package manager and comes with
Expand Down Expand Up @@ -78,6 +81,9 @@ def solve(self, id_, packages, python, platform):
"MAMBA_ADD_PIP_AS_PYTHON_DEPENDENCY": "true",
"CONDA_SUBDIR": platform,
# "CONDA_UNSATISFIABLE_HINTS_CHECK_DEPTH": "0" # https://github.com/conda/conda/issues/9862
# Add a default glibc version for linux-64 environments (ignored for other platforms)
# TODO: Make the version configurable
"CONDA_OVERRIDE_GLIBC": GLIBC_VERSION,
}
cmd = [
"create",
Expand Down Expand Up @@ -132,6 +138,7 @@ def download(self, id_, packages, python, platform):
with tempfile.TemporaryDirectory() as tmp_dir:
env = {
"CONDA_SUBDIR": platform,
"CONDA_OVERRIDE_GLIBC": GLIBC_VERSION,
}
cmd = [
"create",
Expand Down Expand Up @@ -171,6 +178,7 @@ def create(self, id_, packages, python, platform):
# use hardlinks when possible, otherwise copy files
# disabled for now since it adds to environment creation latencies
"CONDA_ALLOW_SOFTLINKS": "0",
"CONDA_OVERRIDE_GLIBC": GLIBC_VERSION,
}
cmd = [
"create",
Expand Down

0 comments on commit 883365d

Please sign in to comment.