-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·38 lines (30 loc) · 1.4 KB
/
setup.sh
File metadata and controls
executable file
·38 lines (30 loc) · 1.4 KB
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
32
33
34
35
36
37
38
#!/bin/bash
set -euo pipefail
ENV_NAME="sbp"
# --- Create conda environment --- #
echo "Creating conda environment: $ENV_NAME"
conda env create -f environment.yml
# Set LD_LIBRARY_PATH to resolve SAPIEN libstdc++ compatibility
CONDA_ENV_PATH="$(conda info --envs | grep "^$ENV_NAME " | awk '{print $NF}')"
conda env config vars set LD_LIBRARY_PATH="$CONDA_ENV_PATH/lib" -n "$ENV_NAME"
conda env config vars set MS_ASSET_DIR="$(pwd)/.maniskill" -n "$ENV_NAME"
# Activate environment (disable nounset temporarily — conda scripts use unbound vars)
set +u
eval "$(conda shell.bash hook)"
conda activate "$ENV_NAME"
set -u
# --- Install PyG extensions (prebuilt wheels matching PyTorch + CUDA) --- #
TORCH_VER="$(python -c "import torch; print(torch.__version__)")"
echo "Installing torch-cluster for PyTorch $TORCH_VER..."
pip install torch-cluster -f "https://data.pyg.org/whl/torch-${TORCH_VER}.html"
# --- Install submodules --- #
echo "Installing submodules..."
pip install -e third_party/ManiSkill -e third_party/mshab
# --- Download ManiSkill assets (each checked individually) --- #
export MS_ASSET_DIR="$(pwd)/.maniskill"
echo "Downloading ManiSkill assets (skipping any already present)..."
yes | python -m mani_skill.utils.download_asset ycb
yes | python -m mani_skill.utils.download_asset ReplicaCAD
yes | python -m mani_skill.utils.download_asset ReplicaCADRearrange
echo ""
echo "Done! Run: conda activate $ENV_NAME"