Skip to content

Commit cb78627

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 61ef892 commit cb78627

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
@@ -155,6 +155,17 @@ To get started, clone the repository and install the package in development mode
155155

156156
```bash
157157
git clone --recurse-submodules git@github.com:abetlen/llama-cpp-python.git
158+
159+
# Install with pip
160+
pip install -e .
161+
162+
# if you want to use the fastapi / openapi server
163+
pip install -e .[server]
164+
165+
# If you're a poetry user, installing will also include a virtual environment
166+
poetry install --all-extras
167+
. .venv/bin/activate
168+
158169
# Will need to be re-run any time vendor/llama.cpp is updated
159170
python3 setup.py develop
160171
```

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)