Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update inference installation #1550

Merged
merged 5 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 27 additions & 6 deletions inference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,35 @@ docker attach open-assistant-inference-text-client-1
> **Note:** Please wait for the `inference-text-generation-server` service to
> output `{"message":"Connected"}` before starting to chat.

## Development Variant 2 (you'll need tmux)
## Development Variant 2 (tmux terminal multiplexing)

Run `./full-dev-setup.sh` to start the full development setup. Make sure to wait
until the 2nd terminal is ready and says `{"message":"Connected"}` before
entering input into the last terminal.
Ensure you have `tmux` installed on you machine and the following packages
installed into the Python environment;

- `uvicorn`
- `worker/requirements.txt`
- `server/requirements.txt`
- `text-client/requirements.txt`
- `oasst_shared`

You can run development setup to start the full development setup.

```bash
cd inference
./full-dev-setup.sh
```

> Make sure to wait until the 2nd terminal is ready and says
> `{"message":"Connected"}` before entering input into the last terminal.

## Development Variant 3 (you'll need multiple terminals)

Run a postgres container:

```bash
docker run --rm -it -p 5432:5432 -e POSTGRES_PASSWORD=postgres --name postgres postgres
```

Run a redis container (or use the one of the general docker compose file):

```bash
Expand All @@ -71,7 +92,7 @@ Run the inference server:
```bash
cd server
pip install -r requirements.txt
uvicorn main:app --reload
DEBUG_API_KEYS='["0000"]' uvicorn main:app --reload
```

Run one (or more) workers:
Expand All @@ -89,7 +110,7 @@ running:
docker run --rm -it -p 8001:80 -e MODEL_ID=distilgpt2 ghcr.io/huggingface/text-generation-inference
```

Run the client:
Run the text client:

```bash
cd text-client
Expand Down
2 changes: 1 addition & 1 deletion inference/server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alembic
fastapi[all]
fastapi[all]==0.88.0
loguru
prometheus-fastapi-instrumentator
psycopg2-binary
Expand Down