mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Support Arm64 CPU architectures
This commit is contained in:
committed by
Erik Sundell
parent
f25d35d7a0
commit
a91571dd22
@@ -170,7 +170,14 @@ def ensure_user_environment(user_requirements_txt_file):
|
||||
# Install mambaforge using an installer from
|
||||
# https://github.com/conda-forge/miniforge/releases
|
||||
mambaforge_new_version = '4.10.3-7'
|
||||
installer_sha256 = "fc872522ec427fcab10167a93e802efaf251024b58cc27b084b915a9a73c4474"
|
||||
# Check system architecture, set appropriate installer checksum
|
||||
if os.uname().machine == 'aarch64':
|
||||
installer_sha256 = "ac95f137b287b3408e4f67f07a284357b1119ee157373b788b34e770ef2392b2"
|
||||
elif os.uname().machine == 'x86_64':
|
||||
installer_sha256 = "fc872522ec427fcab10167a93e802efaf251024b58cc27b084b915a9a73c4474"
|
||||
# Check OS, set appropriate string for conda installer path
|
||||
if os.uname().sysname != 'Linux':
|
||||
raise OSError("TLJH is only supported on Linux platforms.")
|
||||
# Then run `mamba --version` to get the conda and mamba versions
|
||||
# Keep these in sync with tests/test_conda.py::prefix
|
||||
mambaforge_conda_new_version = '4.10.3'
|
||||
@@ -185,7 +192,7 @@ def ensure_user_environment(user_requirements_txt_file):
|
||||
# If no prior miniconda installation is found, we can install a newer version
|
||||
else:
|
||||
logger.info('Downloading & setting up user environment...')
|
||||
installer_url = "https://github.com/conda-forge/miniforge/releases/download/{v}/Mambaforge-{v}-Linux-x86_64.sh".format(v=mambaforge_new_version)
|
||||
installer_url = "https://github.com/conda-forge/miniforge/releases/download/{v}/Mambaforge-{v}-Linux-{arch}.sh".format(v=mambaforge_new_version, arch=os.uname().machine)
|
||||
with conda.download_miniconda_installer(installer_url, installer_sha256) as installer_path:
|
||||
conda.install_miniconda(installer_path, USER_ENV_PREFIX)
|
||||
conda_version = '4.10.3'
|
||||
|
||||
Reference in New Issue
Block a user