From df282ae7357268bc9b1e183bd5ce08e53296e446 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 23 Jun 2026 14:05:08 +0800 Subject: [PATCH] feat: support specifying local offline package path via AI_WORKSPACE_OFFLINE_PACKAGE --- README.md | 8 ++++++++ docs/OFFLINE_AI_WORKSPACE_INSTALLER.md | 7 +++++++ docs/SETUP_AI_WORKSPACE_ALL_IN_ONE.md | 1 + scripts/setup-ai-workspace-all-in-one.sh | 3 ++- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c0bc8e..bbb6d50 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,14 @@ export OLLAMA_API_KEY="your-key-here" curl -sfL https://raw.githubusercontent.com/ai-workspace-lab/xworkspace-console/main/scripts/setup-ai-workspace-all-in-one.sh | bash - ``` +3. Offline installation: + +Use a pre-downloaded deployment package by specifying its file path: +```bash +export AI_WORKSPACE_OFFLINE_PACKAGE="/path/to/offline-package.tar.gz" +curl -sfL https://raw.githubusercontent.com/ai-workspace-lab/xworkspace-console/main/scripts/setup-ai-workspace-all-in-one.sh | bash - +``` + ### Uninstallation ```bash diff --git a/docs/OFFLINE_AI_WORKSPACE_INSTALLER.md b/docs/OFFLINE_AI_WORKSPACE_INSTALLER.md index 5d197c5..0e032ac 100644 --- a/docs/OFFLINE_AI_WORKSPACE_INSTALLER.md +++ b/docs/OFFLINE_AI_WORKSPACE_INSTALLER.md @@ -64,6 +64,13 @@ AI_WORKSPACE_OFFLINE_RELEASE_TAG=offline-ai-workspace- \ bash scripts/setup-ai-workspace-all-in-one.sh ``` +To use a specific, pre-downloaded offline deployment package from the local file system: + +```bash +AI_WORKSPACE_OFFLINE_PACKAGE=/path/to/offline-package.tar.gz \ + bash scripts/setup-ai-workspace-all-in-one.sh +``` + You can also extract the target package on the host and run: ```bash diff --git a/docs/SETUP_AI_WORKSPACE_ALL_IN_ONE.md b/docs/SETUP_AI_WORKSPACE_ALL_IN_ONE.md index 649f9ca..7bfcd2a 100644 --- a/docs/SETUP_AI_WORKSPACE_ALL_IN_ONE.md +++ b/docs/SETUP_AI_WORKSPACE_ALL_IN_ONE.md @@ -42,6 +42,7 @@ curl -sfL https://raw.githubusercontent.com/ai-workspace-lab/xworkspace-console/ | `LITELLM_API_CADDY_STRICT_WHITELIST` | false | Enable with strict deployments when LiteLLM is exposed through Caddy. | | `XWORKSPACE_CONSOLE_ENABLE_XRDP` | false | Enable only when remote desktop access is required. | | `XWORKMATE_BRIDGE_DOMAIN` | host-specific | Set the public Bridge domain, for example `acp-bridge.onwalk.net`. | +| `AI_WORKSPACE_OFFLINE_PACKAGE` | none | Use a pre-downloaded offline package for installation (e.g., `/path/to/offline.tar.gz`). | ## 4. Target Host Example diff --git a/scripts/setup-ai-workspace-all-in-one.sh b/scripts/setup-ai-workspace-all-in-one.sh index c8e197a..a224c98 100755 --- a/scripts/setup-ai-workspace-all-in-one.sh +++ b/scripts/setup-ai-workspace-all-in-one.sh @@ -866,7 +866,8 @@ run_offline_installer() { XWORKSPACE_CONSOLE_HOME \ XWORKSPACE_CONSOLE_SOURCE_REPO \ XWORKSPACE_CONSOLE_SOURCE_VERSION \ - AI_WORKSPACE_APT_LOCK_TIMEOUT; do + AI_WORKSPACE_APT_LOCK_TIMEOUT \ + AI_WORKSPACE_OFFLINE_PACKAGE; do if [ -n "${!env_name+x}" ]; then env_args+=("$env_name=${!env_name}") fi