From cc3df759f8cc54a2ef65c02b0f3a8fa7719bbb5d Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 21 Apr 2025 22:11:43 +0200 Subject: [PATCH] chore(docs): improve installer.sh docs (#5232) Signed-off-by: Ettore Di Giacinto --- README.md | 3 ++ docs/content/docs/advanced/installer.md | 8 +++++ .../docs/getting-started/quickstart.md | 5 +++- docs/static/install.sh | 30 +++++++++++++++---- 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index be1f58e6..c6fc63f2 100644 --- a/README.md +++ b/README.md @@ -103,9 +103,12 @@ Run the installer script: ```bash +# Basic installation curl https://localai.io/install.sh | sh ``` +For more installation options, see [Installer Options](https://localai.io/advanced/installer/). + Or run with docker: ### CPU only image: diff --git a/docs/content/docs/advanced/installer.md b/docs/content/docs/advanced/installer.md index 4cd15a94..f584da27 100644 --- a/docs/content/docs/advanced/installer.md +++ b/docs/content/docs/advanced/installer.md @@ -34,4 +34,12 @@ List of the Environment Variables: | **FEDERATED** | Set to "true" to share the instance with the federation (p2p token is required see [documentation]({{%relref "docs/features/distributed_inferencing" %}})) | | **FEDERATED_SERVER** | Set to "true" to run the instance as a federation server which forwards requests to the federation (p2p token is required see [documentation]({{%relref "docs/features/distributed_inferencing" %}})) | +## Uninstallation + +To uninstall, run: + +``` +curl https://localai.io/install.sh | sh -s -- --uninstall +``` + We are looking into improving the installer, and as this is a first iteration any feedback is welcome! Open up an [issue](https://github.com/mudler/LocalAI/issues/new/choose) if something doesn't work for you! \ No newline at end of file diff --git a/docs/content/docs/getting-started/quickstart.md b/docs/content/docs/getting-started/quickstart.md index 0c3fd652..3ea04480 100644 --- a/docs/content/docs/getting-started/quickstart.md +++ b/docs/content/docs/getting-started/quickstart.md @@ -18,12 +18,15 @@ If you are exposing LocalAI remotely, make sure you protect the API endpoints ad ## Quickstart - ### Using the Bash Installer + ```bash +# Basic installation curl https://localai.io/install.sh | sh ``` +See [Installer]({{% relref "docs/advanced/installer" %}}) for all the supported options + ### Run with docker: ```bash # CPU only image: diff --git a/docs/static/install.sh b/docs/static/install.sh index e01a5a37..cf45cdf2 100644 --- a/docs/static/install.sh +++ b/docs/static/install.sh @@ -1,12 +1,30 @@ #!/bin/sh -# This script installs LocalAI on Linux. -# It detects the current operating system architecture and installs the appropriate version of LocalAI. +# LocalAI Installer Script +# This script installs LocalAI on Linux and macOS systems. +# It automatically detects the system architecture and installs the appropriate version. # Usage: -# curl ... | ENV_VAR=... sh - -# or -# ENV_VAR=... ./install.sh -# To uninstall: ./install.sh --uninstall +# Basic installation: +# curl https://localai.io/install.sh | sh +# +# With environment variables: +# DOCKER_INSTALL=true USE_AIO=true API_KEY=your-key PORT=8080 THREADS=4 curl https://localai.io/install.sh | sh +# +# To uninstall: +# curl https://localai.io/install.sh | sh -s -- --uninstall +# +# Environment Variables: +# DOCKER_INSTALL - Set to "true" to install Docker images (default: auto-detected) +# USE_AIO - Set to "true" to use the all-in-one LocalAI image (default: false) +# API_KEY - API key for securing LocalAI access (default: none) +# PORT - Port to run LocalAI on (default: 8080) +# THREADS - Number of CPU threads to use (default: auto-detected) +# MODELS_PATH - Path to store models (default: /usr/share/local-ai/models) +# CORE_IMAGES - Set to "true" to download core LocalAI images (default: false) +# P2P_TOKEN - Token for P2P federation/worker mode (default: none) +# WORKER - Set to "true" to run as a worker node (default: false) +# FEDERATED - Set to "true" to enable federation mode (default: false) +# FEDERATED_SERVER - Set to "true" to run as a federation server (default: false) set -e set -o noglob