Spaces:
Configuration error
Configuration error
File size: 828 Bytes
87e21d1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
#!/usr/bin/env bash
set -e
CONDA_ENV=${1:-""}
if [ -n "$CONDA_ENV" ]; then
# This is required to activate conda environment
eval "$(conda shell.bash hook)"
conda create -n $CONDA_ENV python=3.10.0 -y
conda activate $CONDA_ENV
# This is optional if you prefer to use built-in nvcc
conda install -c nvidia cuda-toolkit -y
else
echo "Skipping conda environment creation. Make sure you have the correct environment activated."
fi
# init a raw torch to avoid installation errors.
# pip install torch
# update pip to latest version for pyproject.toml setup.
pip install -U pip
# for fast attn
pip install -U xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu121
# install sana
pip install -e .
# install torchprofile
# pip install git+https://github.com/zhijian-liu/torchprofile
|