forked from extern/easydiffusion
Re-download micromamba if necessary
This commit is contained in:
parent
450fb2553c
commit
fc11018158
@ -29,6 +29,7 @@ export MAMBA_ROOT_PREFIX="$(pwd)/installer_files/mamba"
|
|||||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||||
LEGACY_INSTALL_ENV_DIR="$(pwd)/installer"
|
LEGACY_INSTALL_ENV_DIR="$(pwd)/installer"
|
||||||
MICROMAMBA_DOWNLOAD_URL="https://micro.mamba.pm/api/micromamba/${OS_NAME}-${OS_ARCH}/latest"
|
MICROMAMBA_DOWNLOAD_URL="https://micro.mamba.pm/api/micromamba/${OS_NAME}-${OS_ARCH}/latest"
|
||||||
|
umamba_exists="F"
|
||||||
|
|
||||||
# figure out whether git and conda needs to be installed
|
# figure out whether git and conda needs to be installed
|
||||||
if [ -e "$INSTALL_ENV_DIR" ]; then export PATH="$INSTALL_ENV_DIR/bin:$PATH"; fi
|
if [ -e "$INSTALL_ENV_DIR" ]; then export PATH="$INSTALL_ENV_DIR/bin:$PATH"; fi
|
||||||
@ -38,10 +39,12 @@ PACKAGES_TO_INSTALL=""
|
|||||||
if [ ! -e "$LEGACY_INSTALL_ENV_DIR/etc/profile.d/conda.sh" ] && [ ! -e "$INSTALL_ENV_DIR/etc/profile.d/conda.sh" ]; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL conda"; fi
|
if [ ! -e "$LEGACY_INSTALL_ENV_DIR/etc/profile.d/conda.sh" ] && [ ! -e "$INSTALL_ENV_DIR/etc/profile.d/conda.sh" ]; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL conda"; fi
|
||||||
if ! hash "git" &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL git"; fi
|
if ! hash "git" &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL git"; fi
|
||||||
|
|
||||||
|
if "$MAMBA_ROOT_PREFIX/micromamba" --version &>/dev/null; then umamba_exists="T"; fi
|
||||||
|
|
||||||
# (if necessary) install git and conda into a contained environment
|
# (if necessary) install git and conda into a contained environment
|
||||||
if [ "$PACKAGES_TO_INSTALL" != "" ]; then
|
if [ "$PACKAGES_TO_INSTALL" != "" ]; then
|
||||||
# download micromamba
|
# download micromamba
|
||||||
if [ ! -e "$MAMBA_ROOT_PREFIX/micromamba" ]; then
|
if [ "$umamba_exists" == "F" ]; then
|
||||||
echo "Downloading micromamba from $MICROMAMBA_DOWNLOAD_URL to $MAMBA_ROOT_PREFIX/micromamba"
|
echo "Downloading micromamba from $MICROMAMBA_DOWNLOAD_URL to $MAMBA_ROOT_PREFIX/micromamba"
|
||||||
|
|
||||||
mkdir -p "$MAMBA_ROOT_PREFIX"
|
mkdir -p "$MAMBA_ROOT_PREFIX"
|
||||||
|
Loading…
Reference in New Issue
Block a user