Skip to content

Commit

Permalink
feat: add numpy installation and update PyTorch URLs for GPU compatib…
Browse files Browse the repository at this point in the history
…ility
  • Loading branch information
Aatrick committed Feb 10, 2025
1 parent bd60679 commit adcda34
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions pipeline.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ IF NOT ERRORLEVEL 1 (
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
)

uv pip install numpy>=1.24.3

REM Install additional requirements
IF EXIST requirements.txt (
echo Installing additional requirements...
Expand Down
5 changes: 3 additions & 2 deletions pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pip3 install uv
TORCH_URL="https://download.pytorch.org/whl/cpu"
if command -v nvidia-smi &> /dev/null; then
echo "NVIDIA GPU detected"
TORCH_URL="https://download.pytorch.org/whl/cu124"
TORCH_URL="https://download.pytorch.org/whl/cu121"
uv pip install --index-url $TORCH_URL \
torch==2.2.2 torchvision "xformers>=0.0.22" "triton>=2.1.0" \
stable_fast-1.0.5+torch222cu124-cp310-cp310-manylinux2014_x86_64.whl
stable_fast-1.0.5+torch222cu121-cp310-cp310-manylinux2014_x86_64.whl
elif command -v rocminfo &> /dev/null; then
echo "AMD GPU detected"
TORCH_URL="https://download.pytorch.org/whl/rocm5.7"
Expand All @@ -39,6 +39,7 @@ else
torch==2.2.2+cpu torchvision
fi

uv pip install numpy==1.24.3

# Install tkinter
echo "Installing tkinter..."
Expand Down
Binary file modified requirements.txt
Binary file not shown.
2 changes: 2 additions & 0 deletions run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ IF NOT ERRORLEVEL 1 (
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
)

uv pip install numpy>=1.24.3

REM Install additional requirements
IF EXIST requirements.txt (
echo Installing additional requirements...
Expand Down
6 changes: 4 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pip3 install uv
TORCH_URL="https://download.pytorch.org/whl/cpu"
if command -v nvidia-smi &> /dev/null; then
echo "NVIDIA GPU detected"
TORCH_URL="https://download.pytorch.org/whl/cu124"
TORCH_URL="https://download.pytorch.org/whl/cu121"
uv pip install --index-url $TORCH_URL \
torch==2.2.2 torchvision "xformers>=0.0.22" "triton>=2.1.0" \
stable_fast-1.0.5+torch222cu124-cp310-cp310-manylinux2014_x86_64.whl
stable_fast-1.0.5+torch222cu121-cp310-cp310-manylinux2014_x86_64.whl
elif command -v rocminfo &> /dev/null; then
echo "AMD GPU detected"
TORCH_URL="https://download.pytorch.org/whl/rocm5.7"
Expand All @@ -39,6 +39,8 @@ else
torch==2.2.2+cpu torchvision
fi

uv pip install numpy==1.24.3

# Install tkinter
echo "Installing tkinter..."
sudo apt-get install python3.10-tk
Expand Down
2 changes: 2 additions & 0 deletions run_web.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ IF NOT ERRORLEVEL 1 (
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
)

uv pip install numpy>=1.24.3

REM Install additional requirements
IF EXIST requirements.txt (
echo Installing additional requirements...
Expand Down
6 changes: 4 additions & 2 deletions run_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pip3 install uv
TORCH_URL="https://download.pytorch.org/whl/cpu"
if command -v nvidia-smi &> /dev/null; then
echo "NVIDIA GPU detected"
TORCH_URL="https://download.pytorch.org/whl/cu124"
TORCH_URL="https://download.pytorch.org/whl/cu121"
uv pip install --index-url $TORCH_URL \
torch==2.2.2 torchvision "xformers>=0.0.22" "triton>=2.1.0" \
stable_fast-1.0.5+torch222cu124-cp310-cp310-manylinux2014_x86_64.whl
stable_fast-1.0.5+torch222cu121-cp310-cp310-manylinux2014_x86_64.whl
elif command -v rocminfo &> /dev/null; then
echo "AMD GPU detected"
TORCH_URL="https://download.pytorch.org/whl/rocm5.7"
Expand All @@ -39,6 +39,8 @@ else
torch==2.2.2+cpu torchvision
fi

uv pip install numpy==1.24.3

# Install tkinter
echo "Installing tkinter..."
sudo apt-get install python3.10-tk
Expand Down

0 comments on commit adcda34

Please sign in to comment.