Skip to content

feat: add one-line install script for Linux/macOS#5178

Open
OliverBryant wants to merge 1 commit into
xorbitsai:mainfrom
OliverBryant:feat/one-line-install-script
Open

feat: add one-line install script for Linux/macOS#5178
OliverBryant wants to merge 1 commit into
xorbitsai:mainfrom
OliverBryant:feat/one-line-install-script

Conversation

@OliverBryant

Copy link
Copy Markdown
Collaborator

Summary

Adds a one-line installer so Linux/macOS users can install Xinference with:

curl -fsSL https://raw.githubusercontent.com/xorbitsai/inference/main/scripts/install.sh | sh

The script installs Xinference as an isolated uv tool, so it does not touch the system Python and avoids PEP 668 (externally-managed-environment) errors. It bootstraps uv first if it is not already present.

Details

  • New file scripts/install.sh — POSIX sh, supports Linux and macOS (Windows users are directed to pip in a virtualenv).
  • Default installs only the base xinference package to stay small and cross-platform. Heavy extras such as vllm require Linux + CUDA and often fail on macOS/CPU-only machines, so they are opt-in.
  • Environment variables:
    • XINFERENCE_EXTRAS — install optional backends, e.g. XINFERENCE_EXTRAS=all or XINFERENCE_EXTRAS=vllm,transformers.
    • XINFERENCE_VERSION — pin a version, e.g. XINFERENCE_VERSION=1.8.1 (a leading v is stripped).
  • On success it prints how to start the server (xinference-local) and the Web UI URL (http://127.0.0.1:9997), and warns if the command is not yet on PATH.
  • Documented in the README quick start and doc/source/getting_started/installation.rst.

Notes

  • The docs reference the raw GitHub URL so the installer works immediately. If a short vanity domain (e.g. get.xinference.io) is set up later, the URL can be swapped.
  • Validated sh -n syntax and exhaustively tested the package-spec assembly across XINFERENCE_EXTRAS / XINFERENCE_VERSION combinations. The actual uv tool install was not executed in CI-less local testing.

@XprobeBot XprobeBot added this to the v2.x milestone Jul 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new one-line installation script (scripts/install.sh) for Linux and macOS that installs Xinference as an isolated tool using uv, and updates the README and documentation accordingly. The review feedback correctly identifies that the command uv tool update-shell referenced in the script does not exist, and provides a robust code suggestion to simplify the PATH warning logic.

Comment thread scripts/install.sh Outdated
@OliverBryant OliverBryant force-pushed the feat/one-line-install-script branch from 1497e36 to ebf0460 Compare July 14, 2026 10:02
Add scripts/install.sh, a POSIX sh installer invoked via
curl -fsSL .../scripts/install.sh | sh. It installs Xinference as an
isolated uv tool so it does not touch the system Python and avoids
PEP 668 (externally-managed-environment) errors, bootstrapping uv first
if needed.

By default only the base package is installed; XINFERENCE_EXTRAS and
XINFERENCE_VERSION allow opting into optional backends or pinning a
version. Document the one-liner in the README quick start and the
installation guide.
@OliverBryant OliverBryant force-pushed the feat/one-line-install-script branch from ebf0460 to db2784d Compare July 14, 2026 10:06

@qinxuye qinxuye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this. I think the scope needs to be clarified before this becomes the primary Quick Start installer. The base xinference package already depends on torch, so even the default installation is hardware-sensitive: on Linux we need to account for CPU, NVIDIA, AMD/ROCm, Intel GPU, and the driver-supported PyTorch backend. Please use hardware-aware backend selection such as uv --torch-backend auto, allow an explicit override, and keep hardware-specific backends such as vLLM on a clearly supported path. macOS also needs to distinguish Apple Silicon from Intel. Since uv tool creates an isolated environment, packages from an active Conda environment or virtualenv are not reused; the script should at least detect an existing xinference command and warn about PATH/environment conflicts. If the intended scope is only installing the CLI/server framework, the README should state clearly that common model backends are not installed and this should not replace the existing functional Quick Start. Otherwise, please provide explicit CPU/CUDA/ROCm/MLX modes, select a tested Python version, perform preflight checks, and add CI coverage that actually exercises the installer rather than only repository lint/tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants