v2d / simulation /config /paths.sh
hk239's picture
Upload v2d project (excluding data and .venv) (part 14)
3044426 verified
Raw History Blame Contribute Delete
1.03 kB
# Sourced by run scripts. Isolated project venv: simulation/.venv (no conda).
SIM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PROJECT_ROOT="$(cd "$SIM_ROOT/.." && pwd)"
export SIM_ROOT PROJECT_ROOT
if [ -x "$SIM_ROOT/.venv/bin/python" ]; then
export PATH="$SIM_ROOT/.venv/bin:$PATH"
export VIRTUAL_ENV="$SIM_ROOT/.venv"
fi
# Isaac Lab lives under simulation/modules (moved/cloned by setup/00_init_modules.sh).
export ISAACLAB_DIR="$SIM_ROOT/modules/IsaacLab"
export SCRIPTS_DIR="$SIM_ROOT/scripts"
export PYTHONPATH="$SIM_ROOT/source${PYTHONPATH:+:$PYTHONPATH}"
export CHECKPOINTS_DIR="$PROJECT_ROOT/checkpoints"
export DATA_DIR="${DATA_DIR:-$PROJECT_ROOT/data}"
export RUNS_DIR="${RUNS_DIR:-$SIM_ROOT/runs}"
if [ -z "${CUDA_HOME:-}" ]; then
for _cuda in /app/apps/cuda/12.6.2 /usr/local/cuda; do
if [ -x "$_cuda/bin/nvcc" ]; then
export CUDA_HOME="$_cuda"
export PATH="$CUDA_HOME/bin:$PATH"
break
fi
done
unset _cuda
fi
export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0}"