From 30720e732c599abf62516ebc6562abc9ad93157f Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Tue, 9 Jan 2024 12:43:40 -0800 Subject: [PATCH] Add install with pip (#3) --- README.md | 7 +++++-- python/sglang/__init__.py | 2 ++ python/upload_pypi.sh | 3 +++ format.sh => scripts/format.sh | 0 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 python/upload_pypi.sh rename format.sh => scripts/format.sh (100%) diff --git a/README.md b/README.md index fbfeacc40..fd6343e84 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,12 @@ The core features of SGLang include: ## Install -### Method 1: With Pip +### Method 1: With pip +``` +pip install "sglang[all]" +``` -### Method 2: From Source +### Method 2: From source ``` git clone git@github.com:sgl-project/sglang.git cd sglang diff --git a/python/sglang/__init__.py b/python/sglang/__init__.py index 4fe98b772..8de1854d4 100644 --- a/python/sglang/__init__.py +++ b/python/sglang/__init__.py @@ -1,2 +1,4 @@ +__version__ == "0.1.0" + from sglang.api import * from sglang.global_config import global_config diff --git a/python/upload_pypi.sh b/python/upload_pypi.sh new file mode 100644 index 000000000..b0da77ef2 --- /dev/null +++ b/python/upload_pypi.sh @@ -0,0 +1,3 @@ +rm -rf dist +python3 -m build +python3 -m twine upload dist/* diff --git a/format.sh b/scripts/format.sh similarity index 100% rename from format.sh rename to scripts/format.sh