Skip to content

Commit 4a7b1c6

Browse files
committed
Add uv_pip_install_pytorch function
Use it in install_pytorch_from_submodule Signed-off-by: Eric Curtin <eric.curtin@docker.com>
1 parent 04a2853 commit 4a7b1c6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/lib.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ get_repo_root() {
5151
git rev-parse --show-toplevel
5252
}
5353

54+
uv_pip_install_pytorch() {
55+
USE_CUDA=0 USE_CUDNN=0 USE_ROCM=0 USE_MPS=1 uv pip install "$pytorch_dir"
56+
}
57+
5458
# Install PyTorch from submodule
5559
install_pytorch_from_submodule() {
5660
local repo_root
@@ -64,7 +68,7 @@ install_pytorch_from_submodule() {
6468
fi
6569

6670
section "Installing PyTorch from submodule"
67-
if ! uv pip install "$pytorch_dir"; then
71+
if ! uv_pip_install_pytorch; then
6872
error "Failed to install PyTorch from submodule"
6973
return 1
7074
fi

0 commit comments

Comments
 (0)