Anabelle Handdoek
fix(space): move flash-attn install to postBuild; remove from requirements; improve HF messaging
4d5ade5
raw
history blame contribute delete
356 Bytes
#!/usr/bin/env bash
set -euxo pipefail
# Install flash-attn only if CUDA is present (GPU Space)
if python - <<'PY'
import torch, sys
print('cuda', torch.cuda.is_available())
PY
then
pip install --no-cache-dir flash-attn --no-build-isolation || echo "flash-attn install failed; continuing"
else
echo "No CUDA available; skipping flash-attn install"
fi