Skip to content

Commit bebe771

Browse files
committed
README: better setup instructions for developers for pip and poetry
Give folks options + explicit instructions for installing with poetry or pip.
1 parent 7e03fdd commit bebe771

File tree

3 files changed

+155
-8
lines changed

3 files changed

+155
-8
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ To get started, clone the repository and install the package in development mode
141141

142142
```bash
143143
git clone --recurse-submodules [email protected]:abetlen/llama-cpp-python.git
144+
145+
# Install with pip
146+
pip install -e .
147+
148+
# if you want to use the fastapi / openapi server
149+
pip install -e .[server]
150+
151+
# If you're a poetry user, installing will also include a virtual environment
152+
poetry install --all-extras
153+
. .venv/bin/activate
154+
144155
# Will need to be re-run any time vendor/llama.cpp is updated
145156
python3 setup.py develop
146157
```

poetry.lock

Lines changed: 138 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ include = [
1515
[tool.poetry.dependencies]
1616
python = "^3.8.1"
1717
typing-extensions = "^4.5.0"
18-
18+
uvicorn = { version = "^0.21.1", optional = true }
19+
fastapi = { version = "^0.95.0", optional = true }
20+
sse-starlette = { version = "^1.3.3", optional = true }
1921

2022
[tool.poetry.group.dev.dependencies]
2123
black = "^23.3.0"
@@ -27,6 +29,9 @@ pytest = "^7.3.1"
2729
httpx = "^0.24.0"
2830
scikit-build = "0.13"
2931

32+
[tool.poetry.extras]
33+
server = ["uvicorn", "fastapi", "sse-starlette"]
34+
3035
[build-system]
3136
requires = [
3237
"setuptools>=42",

0 commit comments

Comments
 (0)