diff --git a/.gitignore b/.gitignore index a30b2156e8..cb5f2cc107 100644 --- a/.gitignore +++ b/.gitignore @@ -219,3 +219,8 @@ models/gfpgan # ignore initfile invokeai.init + +# ignore environment.yml and requirements.txt +# these are to be copied from environments-and-requirements +environment.yml +requirements.txt \ No newline at end of file diff --git a/1-click-installer/install.bat b/1-click-installer/install.bat index 1054d05634..c8e68d7391 100644 --- a/1-click-installer/install.bat +++ b/1-click-installer/install.bat @@ -81,6 +81,7 @@ call conda activate @rem create the environment call conda env remove -n invokeai +mklink environment.yml environments-and-requirements\environment-win-cuda.yml call conda env create if "%ERRORLEVEL%" NEQ "0" ( echo "" diff --git a/1-click-installer/install.sh b/1-click-installer/install.sh index fbee171469..a2aeed0470 100755 --- a/1-click-installer/install.sh +++ b/1-click-installer/install.sh @@ -94,14 +94,19 @@ CONDA_BASEPATH=$(conda info --base) source "$CONDA_BASEPATH/etc/profile.d/conda.sh" # otherwise conda complains about 'shell not initialized' (needed when running in a script) conda activate - if [ "$OS_NAME" == "mac" ]; then - environment_file="environment-mac.yml" + echo "Macintosh system detected. Installing MPS and CPU support." + ln -sf environments-and-requirements/environment-mac.yml environment.yml else - environment_file="environment.yml" + if (lsmod | grep amdgpu) &>/dev/null ; then + echo "Linux system with AMD GPU driver detected. Installing ROCm and CPU support" + ln -sf environments-and-requirements/environment-lin-amd.yml environment.yml + else + echo "Linux system detected. Installing CUDA and CPU support." + ln -sf environments-and-requirements/environment-lin-cuda.yml environment.yml + fi fi - -conda env update -f "${environment_file}" +conda env update status=$? diff --git a/environment-linux-aarch64.yml b/environments-and-requirements/environment-lin-aarch64.yml similarity index 100% rename from environment-linux-aarch64.yml rename to environments-and-requirements/environment-lin-aarch64.yml diff --git a/environment-AMD.yml b/environments-and-requirements/environment-lin-amd.yml similarity index 100% rename from environment-AMD.yml rename to environments-and-requirements/environment-lin-amd.yml diff --git a/environment-linux-cuda.yml b/environments-and-requirements/environment-lin-cuda.yml similarity index 100% rename from environment-linux-cuda.yml rename to environments-and-requirements/environment-lin-cuda.yml diff --git a/environment-mac.yml b/environments-and-requirements/environment-mac.yml similarity index 100% rename from environment-mac.yml rename to environments-and-requirements/environment-mac.yml diff --git a/environment-win-cuda.yml b/environments-and-requirements/environment-win-cuda.yml similarity index 100% rename from environment-win-cuda.yml rename to environments-and-requirements/environment-win-cuda.yml diff --git a/requirements-mac-MPS-CPU.txt b/environments-and-requirements/requirements-lin-amd.txt similarity index 100% rename from requirements-mac-MPS-CPU.txt rename to environments-and-requirements/requirements-lin-amd.txt diff --git a/requirements-lin-AMD.txt b/environments-and-requirements/requirements-linux-amd.txt similarity index 100% rename from requirements-lin-AMD.txt rename to environments-and-requirements/requirements-linux-amd.txt diff --git a/requirements-linux-arm64.txt b/environments-and-requirements/requirements-linux-arm64.txt similarity index 100% rename from requirements-linux-arm64.txt rename to environments-and-requirements/requirements-linux-arm64.txt diff --git a/requirements-linux-cuda.txt b/environments-and-requirements/requirements-linux-cuda.txt similarity index 100% rename from requirements-linux-cuda.txt rename to environments-and-requirements/requirements-linux-cuda.txt diff --git a/requirements-lin-win-colab-CUDA.txt b/environments-and-requirements/requirements-linux-windows-colab-cuda.txt similarity index 100% rename from requirements-lin-win-colab-CUDA.txt rename to environments-and-requirements/requirements-linux-windows-colab-cuda.txt diff --git a/requirements-rocm.txt b/environments-and-requirements/requirements-mac-mps-cpu.txt similarity index 100% rename from requirements-rocm.txt rename to environments-and-requirements/requirements-mac-mps-cpu.txt