jkorstad commited on
Commit
819f336
·
verified ·
1 Parent(s): 4118727

Update setup_blender.sh

Browse files
Files changed (1) hide show
  1. setup_blender.sh +5 -9
setup_blender.sh CHANGED
@@ -23,9 +23,6 @@ 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
- # flash-attn version known to have compatible wheels (Python 3.11, PyTorch 2.3.1+cu121)
27
- FLASH_ATTN_VERSION_TO_INSTALL="2.5.9.post1" # This version has pt23cu121 wheels
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,7 +42,7 @@ echo "Blender Python Executable: ${BLENDER_PY_EXEC}"
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,15 +103,14 @@ echo "Step 1: Installing PyTorch ${TORCH_VERSION} (for CUDA ${TARGET_CUDA_VERSIO
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 (binary only, no build isolation)..."
110
- # Try to install flash-attn, strongly preferring a binary wheel.
111
  # The --no-build-isolation flag allows it to see the already installed PyTorch.
112
- # The --only-binary :all: flag (or --only-binary flash-attn) tells pip to not attempt source builds.
113
- # We use :all: here for this specific command to be absolutely sure pip doesn't try to build flash-attn or its immediate small deps from source.
114
  "${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
115
  --no-build-isolation \
116
  --only-binary ":all:" \
117
- flash-attn==${FLASH_ATTN_VERSION_TO_INSTALL} -vvv
118
  echo "flash-attn installation attempted from PyPI."
119
 
120
  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
  # --- 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
  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 latest compatible flash-attn binary."
46
 
47
  # --- Download and Extract Blender ---
48
  mkdir -p "${BLENDER_INSTALL_BASE}"
 
103
  --index-url ${TORCH_INDEX_URL} -vvv
104
  echo "PyTorch and Torchvision installation attempted."
105
 
106
+ echo "Step 2: Installing flash-attn from PyPI (binary only, no build isolation, latest compatible version)..."
107
+ # Try to install flash-attn, strongly preferring a binary wheel, letting pip choose the version.
108
  # The --no-build-isolation flag allows it to see the already installed PyTorch.
109
+ # The --only-binary ":all:" flag tells pip to not attempt source builds for any package in this command.
 
110
  "${BLENDER_PY_EXEC}" -m pip install --no-cache-dir \
111
  --no-build-isolation \
112
  --only-binary ":all:" \
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}..."