openpilot/tinygrad_repo/extra/setup_mock_amd_osx.sh
Vehicle Researcher c5d5c5d1f3 openpilot v0.10.1 release
date: 2025-10-24T00:30:59
master commit: 405631baf9685e171a0dd19547cb763f1b163d18
2025-10-24 00:31:03 -07:00

23 lines
1008 B
Bash
Executable File

#!/bin/bash
INSTALL_PATH="${1:-/opt/homebrew/lib}"
if [ ! -d "$INSTALL_PATH" ]; then
USER=$(whoami)
echo "No path $INSTALL_PATH. Will create. Might need your password..."
echo "You can stop now and provide any location as an argument where you want to save the libs (note, that not default locations should be in LD_LIBRARY_PATH, so tinygrad can find the libs)."
echo "Press any key or symbol to continue..."
read -n 1 -s
sudo mkdir -p "$INSTALL_PATH"
sudo chown -R "$USER":staff "$INSTALL_PATH"
fi
# Download libremu.dylib
curl -s https://api.github.com/repos/Qazalin/remu/releases/latest | \
jq -r '.assets[] | select(.name == "libremu.dylib").browser_download_url' | \
xargs curl -L -o $INSTALL_PATH/libremu.dylib
# Download libamd_comgr.dylib
curl -s https://api.github.com/repos/tinygrad/amdcomgr_dylib/releases/latest | \
jq -r '.assets[] | select(.name == "libamd_comgr.dylib").browser_download_url' | \
xargs curl -L -o $INSTALL_PATH/libamd_comgr.dylib