Spaces:
Build error
Build error
Update setup_blender.sh
Browse files- setup_blender.sh +5 -29
setup_blender.sh
CHANGED
|
@@ -19,20 +19,6 @@ TORCHVISION_VERSION="0.18.1"
|
|
| 19 |
TORCH_CUDA_SUFFIX="cu121" # CUDA version suffix for wheels
|
| 20 |
TORCH_INDEX_URL="https://download.pytorch.org/whl/${TORCH_CUDA_SUFFIX}" # Make sure this matches your target CUDA
|
| 21 |
|
| 22 |
-
# PyTorch Geometric wheel URLs (Update these if versions change)
|
| 23 |
-
PYG_TORCH_VERSION_SUFFIX="2.3.1" # PyTorch version suffix in PyG URLs
|
| 24 |
-
PYG_PYTHON_VERSION="cp311" # Python version suffix
|
| 25 |
-
PYG_CUDA_SUFFIX="cu121" # CUDA version suffix
|
| 26 |
-
# Base URL for the directory containing the wheels
|
| 27 |
-
PYG_BASE_URL="https://data.pyg.org/whl/torch-${PYG_TORCH_VERSION_SUFFIX}+${PYG_CUDA_SUFFIX}"
|
| 28 |
-
# Correct wheel filenames (checked against the index page)
|
| 29 |
-
TORCH_SCATTER_WHL_FILENAME="torch_scatter-2.1.2-${PYG_PYTHON_VERSION}-${PYG_PYTHON_VERSION}-linux_x86_64.whl"
|
| 30 |
-
TORCH_CLUSTER_WHL_FILENAME="torch_cluster-1.6.3-${PYG_PYTHON_VERSION}-${PYG_PYTHON_VERSION}-linux_x86_64.whl"
|
| 31 |
-
# Construct the full URLs
|
| 32 |
-
TORCH_SCATTER_WHL_URL="${PYG_BASE_URL}/${TORCH_SCATTER_WHL_FILENAME}"
|
| 33 |
-
TORCH_CLUSTER_WHL_URL="${PYG_BASE_URL}/${TORCH_CLUSTER_WHL_FILENAME}"
|
| 34 |
-
|
| 35 |
-
|
| 36 |
# --- Download and Extract Blender ---
|
| 37 |
echo "Downloading Blender ${BLENDER_VERSION}..."
|
| 38 |
wget -nv -O /tmp/${BLENDER_TARBALL} ${BLENDER_URL}
|
|
@@ -67,7 +53,7 @@ echo "Upgrading pip for Blender Python..."
|
|
| 67 |
"${BLENDER_PY_EXEC}" -m pip install --upgrade pip setuptools wheel
|
| 68 |
|
| 69 |
# --- Install PyTorch and Torchvision FIRST ---
|
| 70 |
-
# This is crucial because
|
| 71 |
echo "Installing PyTorch ${TORCH_VERSION} and Torchvision ${TORCHVISION_VERSION} first (CUDA: ${TORCH_CUDA_SUFFIX})..."
|
| 72 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
|
| 73 |
torch==${TORCH_VERSION} \
|
|
@@ -76,20 +62,10 @@ echo "Installing PyTorch ${TORCH_VERSION} and Torchvision ${TORCHVISION_VERSION}
|
|
| 76 |
|
| 77 |
echo "PyTorch and Torchvision installation complete."
|
| 78 |
|
| 79 |
-
# --- Install
|
| 80 |
-
# This
|
| 81 |
-
|
| 82 |
-
echo "
|
| 83 |
-
echo "Cluster wheel URL: ${TORCH_CLUSTER_WHL_URL}"
|
| 84 |
-
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
|
| 85 |
-
"${TORCH_SCATTER_WHL_URL}" \
|
| 86 |
-
"${TORCH_CLUSTER_WHL_URL}"
|
| 87 |
-
|
| 88 |
-
echo "torch-scatter and torch-cluster installation complete."
|
| 89 |
-
|
| 90 |
-
# --- Install the rest of the packages from unirig_requirements.txt THIRD ---
|
| 91 |
-
# Pip will skip torch, torchvision, torch-scatter, torch-cluster if already installed.
|
| 92 |
-
echo "Installing remaining packages from ${UNIRIG_REQS_FILE}..."
|
| 93 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir -r "${UNIRIG_REQS_FILE}"
|
| 94 |
|
| 95 |
echo "UniRig dependency installation for Blender Python complete."
|
|
|
|
| 19 |
TORCH_CUDA_SUFFIX="cu121" # CUDA version suffix for wheels
|
| 20 |
TORCH_INDEX_URL="https://download.pytorch.org/whl/${TORCH_CUDA_SUFFIX}" # Make sure this matches your target CUDA
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
# --- Download and Extract Blender ---
|
| 23 |
echo "Downloading Blender ${BLENDER_VERSION}..."
|
| 24 |
wget -nv -O /tmp/${BLENDER_TARBALL} ${BLENDER_URL}
|
|
|
|
| 53 |
"${BLENDER_PY_EXEC}" -m pip install --upgrade pip setuptools wheel
|
| 54 |
|
| 55 |
# --- Install PyTorch and Torchvision FIRST ---
|
| 56 |
+
# This is crucial because torch-scatter/torch-cluster setup needs torch.
|
| 57 |
echo "Installing PyTorch ${TORCH_VERSION} and Torchvision ${TORCHVISION_VERSION} first (CUDA: ${TORCH_CUDA_SUFFIX})..."
|
| 58 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
|
| 59 |
torch==${TORCH_VERSION} \
|
|
|
|
| 62 |
|
| 63 |
echo "PyTorch and Torchvision installation complete."
|
| 64 |
|
| 65 |
+
# --- Install the rest of the packages from unirig_requirements.txt SECOND ---
|
| 66 |
+
# This will now install torch-scatter, torch-cluster (using the -f flags in the file),
|
| 67 |
+
# and all other dependencies. Pip will skip torch/torchvision as they are already installed.
|
| 68 |
+
echo "Installing remaining packages from ${UNIRIG_REQS_FILE} (including torch-scatter/cluster via -f flags)..."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir -r "${UNIRIG_REQS_FILE}"
|
| 70 |
|
| 71 |
echo "UniRig dependency installation for Blender Python complete."
|