diff --git a/README.md b/README.md index a777e9fc2..b9863ee3a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,12 @@ curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | **Homebrew dev cask (macOS Apple Silicon):** +```bash +curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install-dev.sh | sh +``` + +Or install the cask directly: + ```bash brew tap nvidia/openshell https://github.com/NVIDIA/OpenShell.git brew install --cask nvidia/openshell/openshell-dev diff --git a/architecture/build-containers.md b/architecture/build-containers.md index 2aea71dfe..78ac421e4 100644 --- a/architecture/build-containers.md +++ b/architecture/build-containers.md @@ -52,6 +52,8 @@ brew install --cask nvidia/openshell/openshell-dev The archive exposes `openshell`, `openshell-gateway`, and `openshell-driver-vm` through cask `binary` stanzas. The gateway entrypoint is a wrapper that sets `OPENSHELL_DRIVER_DIR` to the bundled driver directory before executing the real gateway binary. The cask signs the VM driver with the Hypervisor entitlement during `postflight`. +`install-dev.sh` installs the same dev cask automatically on macOS Apple Silicon. On Linux amd64 and arm64, it installs the rolling development Debian package. + ## Python Wheels OpenShell also publishes Python wheels for `linux/amd64`, `linux/arm64`, and macOS ARM64. diff --git a/install-dev.sh b/install-dev.sh index dc0666cd6..d98de09cc 100755 --- a/install-dev.sh +++ b/install-dev.sh @@ -5,7 +5,8 @@ # Install the OpenShell development build from the rolling GitHub `dev` release. # # This script is intended as a convenient installer for development builds. It -# currently supports Debian packages on Linux amd64 and arm64 only. +# supports Debian packages on Linux amd64/arm64 and the Homebrew dev cask on +# macOS Apple Silicon. # set -e @@ -14,6 +15,9 @@ REPO="NVIDIA/OpenShell" GITHUB_URL="https://github.com/${REPO}" RELEASE_TAG="dev" CHECKSUMS_NAME="openshell-checksums-sha256.txt" +HOMEBREW_TAP="nvidia/openshell" +HOMEBREW_TAP_URL="${GITHUB_URL}.git" +HOMEBREW_CASK="${HOMEBREW_TAP}/openshell-dev" info() { printf '%s: %s\n' "$APP_NAME" "$*" >&2 @@ -26,7 +30,7 @@ error() { usage() { cat </dev/null 2>&1; then + info "reinstalling ${HOMEBREW_CASK}..." + brew reinstall --cask "${HOMEBREW_CASK}" + else + info "installing ${HOMEBREW_CASK}..." + brew install --cask "${HOMEBREW_CASK}" + fi + + _brew_prefix="$(brew --prefix)" + _openshell_bin="${_brew_prefix}/bin/openshell" + if [ -x "$_openshell_bin" ]; then + _installed_version="$("$_openshell_bin" --version 2>/dev/null || true)" + if [ -n "$_installed_version" ]; then + info "installed ${_installed_version} via Homebrew" + else + info "installed OpenShell development cask via Homebrew" + fi + else + info "installed OpenShell development cask via Homebrew" + fi +} + main() { - while [ "$#" -gt 0 ]; do - case "$1" in + for arg in "$@"; do + case "$arg" in --help) usage exit 0 ;; *) - error "unknown option: $1" + error "unknown option: $arg" ;; esac - shift done require_cmd curl + + if [ "$(uname -s)" = "Darwin" ]; then + install_homebrew_cask + return 0 + fi + check_platform TARGET_USER="$(target_user)"