Spaces:
Build error
Build error
Update setup_blender.sh
Browse files- setup_blender.sh +12 -5
setup_blender.sh
CHANGED
|
@@ -23,6 +23,10 @@ TORCHVISION_VERSION="0.18.1"
|
|
| 23 |
TARGET_CUDA_VERSION_SHORT="cu121" # PyTorch 2.3.1 wheels are available for cu121
|
| 24 |
TORCH_INDEX_URL="https://download.pytorch.org/whl/${TARGET_CUDA_VERSION_SHORT}"
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# --- Set Environment Variables for Build ---
|
| 27 |
export CUDA_HOME=${CUDA_HOME:-/usr/local/cuda}
|
| 28 |
export PATH="${CUDA_HOME}/bin:${LOCAL_BIN_DIR}:${PATH}"
|
|
@@ -98,12 +102,15 @@ echo "Step 1: Installing PyTorch ${TORCH_VERSION} (for CUDA ${TARGET_CUDA_VERSIO
|
|
| 98 |
--index-url ${TORCH_INDEX_URL} -vvv
|
| 99 |
echo "PyTorch and Torchvision installation attempted."
|
| 100 |
|
| 101 |
-
echo "Step 2: Installing
|
| 102 |
-
#
|
| 103 |
-
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
|
| 106 |
-
--only-binary flash-attn \
|
| 107 |
-r "${UNIRIG_REQS_FILE_IN_SPACE}" -vvv
|
| 108 |
|
| 109 |
echo "Dependency installation for Blender's Python complete."
|
|
|
|
| 23 |
TARGET_CUDA_VERSION_SHORT="cu121" # PyTorch 2.3.1 wheels are available for cu121
|
| 24 |
TORCH_INDEX_URL="https://download.pytorch.org/whl/${TARGET_CUDA_VERSION_SHORT}"
|
| 25 |
|
| 26 |
+
# Direct URL for the compatible flash-attn wheel
|
| 27 |
+
# Corresponds to Python 3.11 (cp311), PyTorch 2.3.1+cu121
|
| 28 |
+
FLASH_ATTN_WHEEL_URL="https://github.com/Dao-AILab/flash-attention/releases/download/v2.5.9.post1/flash_attn-2.5.9.post1+pt23cu121-cp311-cp311-linux_x86_64.whl"
|
| 29 |
+
|
| 30 |
# --- Set Environment Variables for Build ---
|
| 31 |
export CUDA_HOME=${CUDA_HOME:-/usr/local/cuda}
|
| 32 |
export PATH="${CUDA_HOME}/bin:${LOCAL_BIN_DIR}:${PATH}"
|
|
|
|
| 102 |
--index-url ${TORCH_INDEX_URL} -vvv
|
| 103 |
echo "PyTorch and Torchvision installation attempted."
|
| 104 |
|
| 105 |
+
echo "Step 2: Installing flash-attn directly from wheel URL..."
|
| 106 |
+
# Install flash-attn from a direct wheel URL to ensure compatibility
|
| 107 |
+
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir "${FLASH_ATTN_WHEEL_URL}" -vvv
|
| 108 |
+
echo "flash-attn installation attempted from wheel."
|
| 109 |
+
|
| 110 |
+
echo "Step 3: Installing remaining dependencies from ${UNIRIG_REQS_FILE_IN_SPACE}..."
|
| 111 |
+
# Ensure flash-attn is REMOVED from unirig_requirements.txt to avoid conflicts or reinstallation attempts.
|
| 112 |
+
# This will install torch-scatter, torch-cluster, spconv, bpy, etc.
|
| 113 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
|
|
|
|
| 114 |
-r "${UNIRIG_REQS_FILE_IN_SPACE}" -vvv
|
| 115 |
|
| 116 |
echo "Dependency installation for Blender's Python complete."
|