Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Changed the production recommendation - docker first, running gunicorn as alternative
  • Loading branch information
igiloh-pinecone authored Feb 8, 2024
1 parent 1a47653 commit 65eb7bd
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,15 @@ client = OpenAI(base_url="http://localhost:8000/v1/my-namespace")

Canopy is using FastAPI as the web framework and Uvicorn as the ASGI server. It is recommended to use Gunicorn as the production server, mainly because it supports multiple worker processes and can handle multiple requests in parallel, more details can be found [here](https://www.uvicorn.org/deployment/#using-a-process-manager).

To run the canopy server for production, please run:

```bash
gunicorn canopy_server.app:app --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:PORT --workers WORKER_COUNT
```

Note: replace `PORT` and `WORKER_COUNT` with values.

Alternatively, consider utilizing the Canopy Docker image available on [GitHub Packages](https://github.com/pinecone-io/canopy/pkgs/container/canopy)
To use Canopy in production, it is recommended to utilize Canopy's docker image available on [GitHub Packages](https://github.com/pinecone-io/canopy/pkgs/container/canopy)
for your production needs. For guidance on deploying Canopy on the Google Cloud Platform (GCP), refer to the example provided in the
[Deployment to GCP](docs/deployment-gcp.md) documentation.

Alternatively, you can run the canopy server with `gunicorn` WSGI, which is designed for procuction.
Set your desired `PORT` and `WORKER_COUNT` envrionment variables, and start the server with:
```bash
gunicorn canopy_server.app:app --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT --workers $WORKER_COUNT
```

> [!IMPORTANT]
> The server interacts with services like Pinecone and OpenAI using your own authentication credentials.
Expand Down

0 comments on commit 65eb7bd

Please sign in to comment.