Skip to content

Commit

Permalink
feat: add --helix-version flag to install script
Browse files Browse the repository at this point in the history
Allow users to override the installed version instead of always using latest
  • Loading branch information
lukemarsden committed Nov 9, 2024
1 parent 1098831 commit 49ce829
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ OLDER_GPU=false
HF_TOKEN=""
PROXY=https://get.helix.ml
EXTRA_OLLAMA_MODELS=""
HELIX_VERSION=""

# Determine OS and architecture
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
Expand All @@ -45,8 +46,14 @@ case $ARCH in
*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac

# Determine latest release
LATEST_RELEASE=$(curl -s ${PROXY}/latest.txt)
# Determine version to install
if [ -n "$HELIX_VERSION" ]; then
LATEST_RELEASE="$HELIX_VERSION"
echo "Using specified Helix version: $LATEST_RELEASE"
else
LATEST_RELEASE=$(curl -s ${PROXY}/latest.txt)
echo "Using latest Helix version: $LATEST_RELEASE"
fi

# Set binary name
BINARY_NAME="helix-${OS}-${ARCH}"
Expand Down Expand Up @@ -78,6 +85,7 @@ Options:
--hf-token <token> Specify the Hugging Face token for downloading models
-y Auto approve the installation
--extra-ollama-models Specify additional Ollama models to download when installing the runner (comma-separated), for example "nemotron-mini:4b,codegemma:2b-code-q8_0"
--helix-version <version> Override the Helix version to install (e.g. 1.4.0-rc4, defaults to latest stable)
Examples:
Expand Down Expand Up @@ -198,6 +206,14 @@ while [[ $# -gt 0 ]]; do
EXTRA_OLLAMA_MODELS="$2"
shift 2
;;
--helix-version=*)
HELIX_VERSION="${1#*=}"
shift
;;
--helix-version)
HELIX_VERSION="$2"
shift 2
;;
*)
echo "Unknown option: $1"
display_help
Expand Down Expand Up @@ -700,7 +716,7 @@ EOF"
echo ""
echo "│ to start/upgrade Helix. Helix will be available at $API_HOST"
echo "│ This will take a minute or so to boot."
echo "└──────────────────────────────────────────────────────────────────────────"
echo "└───────────────────────���───────────────────────────────────────────────────"
fi

# Install runner if requested or in AUTO mode with GPU
Expand Down

0 comments on commit 49ce829

Please sign in to comment.