pop-so101 / code /setup_env.sh
khanhnd61's picture
Claude Opus 5.5
Roll-out on an SO-101 with LeRobot: code/ and model card section
5a3fcf5 verified
Raw History Blame Contribute Delete
1.21 kB
#!/bin/bash
# Once, on a node with internet: install uv $UV_VERSION into $POPT_WORK/uv/bin, then Python 3.10 and the locked
# packages (uv.lock) into $UV_PROJECT_ENVIRONMENT, and check that AV1 video decodes.
set -euo pipefail
cd "$(dirname "$0")"
source config.env
mkdir -p "$POPT_WORK/uv/bin"
if [ ! -x "$POPT_WORK/uv/bin/uv" ]; then
curl -LsSf "https://astral.sh/uv/$UV_VERSION/install.sh" | env UV_UNMANAGED_INSTALL="$POPT_WORK/uv/bin" sh
fi
[ "$(command -v uv)" = "$POPT_WORK/uv/bin/uv" ] || { echo "uv on PATH is not $POPT_WORK/uv/bin/uv"; exit 1; }
uv --version
uv sync --frozen
uv run --no-sync python - <<'PY'
import sys
import av, numpy, pyarrow, torch, huggingface_hub
dec = [n for n in ("libdav1d", "libaom-av1", "av1") if n in av.codecs_available]
assert dec, "this PyAV build has no AV1 decoder; most videos in the dataset are AV1"
print(f"python {sys.version.split()[0]}, torch {torch.__version__} (CUDA {torch.version.cuda}, GPUs visible here: "
f"{torch.cuda.device_count()}), av {av.__version__} (AV1 decoders: {dec}), pyarrow {pyarrow.__version__}, "
f"numpy {numpy.__version__}, huggingface_hub {huggingface_hub.__version__}")
PY
echo "environment ready: $UV_PROJECT_ENVIRONMENT"