File size: 807 Bytes
d93804e | 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 | #!/usr/bin/env bash
set -euo pipefail
BUNDLE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TARGET_ROOT="${1:-$HOME/workspace/teddybear_openpi}"
mkdir -p "$TARGET_ROOT"
mkdir -p "$TARGET_ROOT/openpi"
mkdir -p "$TARGET_ROOT/sim"
if ! command -v uv >/dev/null 2>&1; then
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.cargo/bin:$PATH"
fi
if ! command -v hf >/dev/null 2>&1; then
curl -LsSf https://hf.co/cli/install.sh | bash -s
fi
if [[ -n "${HF_TOKEN:-}" ]]; then
hf auth whoami >/dev/null 2>&1 || hf auth login --token "$HF_TOKEN"
fi
cp -a "$BUNDLE_ROOT/code/openpi/." "$TARGET_ROOT/openpi/"
cp -a "$BUNDLE_ROOT/sim/." "$TARGET_ROOT/sim/"
cd "$TARGET_ROOT/openpi"
uv sync --frozen
. .venv/bin/activate
pip install scipy opencv-python-headless
echo "$TARGET_ROOT"
|