File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ BASEDIR=$(pwd)
2424$PYTHON_COMMAND -m venv " $BASEDIR /env"
2525# shellcheck disable=SC1091
2626source " $BASEDIR /env/bin/activate"
27- pip install torch==2.0.1 torchvision=0.15.2
27+ pip install torch==2.0.1 torchvision== 0.15.2
2828pip install -r " $BASEDIR /requirements.txt"
2929chmod +x " start.sh"
3030read -n1 -r -p " DiffusionMagic installation completed,press any key to continue..." key
Original file line number Diff line number Diff line change 1- #! /bin/bash
2- # Part of DiffusionMagic - Script to install DiffusionMagic
1+ #! /usr/bin/env bash
2+ echo Starting DiffusionMagic env installation...
3+ set -e
4+ PYTHON_COMMAND=" python3"
5+
6+ if ! command -v python3 & > /dev/null; then
7+ if ! command -v python & > /dev/null; then
8+ echo " Error: Python not found, please install python 3.8 or higher and try again"
9+ exit 1
10+ fi
11+ fi
12+
13+ if command -v python & > /dev/null; then
14+ PYTHON_COMMAND=" python"
15+ fi
16+
17+ echo " Found $PYTHON_COMMAND command"
18+
19+ python_version=$( $PYTHON_COMMAND --version 2>&1 | awk ' {print $2}' )
20+ echo " Python version : $python_version "
21+
322BASEDIR=$( pwd)
4- chmod +x $BASEDIR /tools/linux/micromamba
5- chmod +x start.sh
6- $BASEDIR /tools/linux/micromamba -r $BASEDIR /env create -y -f $BASEDIR /environment.yml
7- $BASEDIR /tools/linux/micromamba shell init -s bash -p $BASEDIR /umamba
8- read -n1 -r -p " Diffusion magic installation completed,press any key to continue..." key
23+
24+ $PYTHON_COMMAND -m venv " $BASEDIR /env"
25+ # shellcheck disable=SC1091
26+ source " $BASEDIR /env/bin/activate"
27+ pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu117
28+ pip install -r " $BASEDIR /requirements.txt"
29+ chmod +x " start.sh"
30+ read -n1 -r -p " DiffusionMagic installation completed,press any key to continue..." key
You can’t perform that action at this time.
0 commit comments