Spaces:
Running
on
Zero
Running
on
Zero
Update setup_blender.sh
Browse files- setup_blender.sh +8 -6
setup_blender.sh
CHANGED
@@ -23,6 +23,9 @@ 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} # This might be nominal if nvcc isn't actually used
|
28 |
export PATH="${CUDA_HOME}/bin:${LOCAL_BIN_DIR}:${PATH}"
|
@@ -42,7 +45,7 @@ echo "Blender Python Executable: ${BLENDER_PY_EXEC}"
|
|
42 |
echo "Using CUDA_HOME=${CUDA_HOME}"
|
43 |
echo "Targeting PyTorch for CUDA: ${TARGET_CUDA_VERSION_SHORT}"
|
44 |
echo "TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST}"
|
45 |
-
echo "Attempting to install
|
46 |
|
47 |
# --- Download and Extract Blender ---
|
48 |
mkdir -p "${BLENDER_INSTALL_BASE}"
|
@@ -103,14 +106,13 @@ echo "Step 1: Installing PyTorch ${TORCH_VERSION} (for CUDA ${TARGET_CUDA_VERSIO
|
|
103 |
--index-url ${TORCH_INDEX_URL} -vvv
|
104 |
echo "PyTorch and Torchvision installation attempted."
|
105 |
|
106 |
-
echo "Step 2: Installing flash-attn from PyPI (
|
107 |
-
# Try to install flash-attn,
|
108 |
# The --no-build-isolation flag allows it to see the already installed PyTorch.
|
109 |
-
#
|
110 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
|
111 |
--no-build-isolation \
|
112 |
-
|
113 |
-
flash-attn -vvv
|
114 |
echo "flash-attn installation attempted from PyPI."
|
115 |
|
116 |
echo "Step 3: Installing remaining dependencies from ${UNIRIG_REQS_FILE_IN_SPACE}..."
|
|
|
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 |
+
# Specific flash-attn version to try, known for good wheel coverage
|
27 |
+
FLASH_ATTN_VERSION_TO_INSTALL="2.5.8"
|
28 |
+
|
29 |
# --- Set Environment Variables for Build ---
|
30 |
export CUDA_HOME=${CUDA_HOME:-/usr/local/cuda} # This might be nominal if nvcc isn't actually used
|
31 |
export PATH="${CUDA_HOME}/bin:${LOCAL_BIN_DIR}:${PATH}"
|
|
|
45 |
echo "Using CUDA_HOME=${CUDA_HOME}"
|
46 |
echo "Targeting PyTorch for CUDA: ${TARGET_CUDA_VERSION_SHORT}"
|
47 |
echo "TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST}"
|
48 |
+
echo "Attempting to install flash-attn version: ${FLASH_ATTN_VERSION_TO_INSTALL}"
|
49 |
|
50 |
# --- Download and Extract Blender ---
|
51 |
mkdir -p "${BLENDER_INSTALL_BASE}"
|
|
|
106 |
--index-url ${TORCH_INDEX_URL} -vvv
|
107 |
echo "PyTorch and Torchvision installation attempted."
|
108 |
|
109 |
+
echo "Step 2: Installing flash-attn==${FLASH_ATTN_VERSION_TO_INSTALL} from PyPI (with --no-build-isolation)..."
|
110 |
+
# Try to install flash-attn, letting pip search PyPI.
|
111 |
# The --no-build-isolation flag allows it to see the already installed PyTorch.
|
112 |
+
# We are NOT using --only-binary here to see if it attempts a source build and what error occurs.
|
113 |
"${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
|
114 |
--no-build-isolation \
|
115 |
+
flash-attn==${FLASH_ATTN_VERSION_TO_INSTALL} -vvv
|
|
|
116 |
echo "flash-attn installation attempted from PyPI."
|
117 |
|
118 |
echo "Step 3: Installing remaining dependencies from ${UNIRIG_REQS_FILE_IN_SPACE}..."
|