Add the installation step of postgresql and pgvector on windows in LlamaIndex GPU support (#10328)
* add the installation of postgresql and pgvector of windows * fix some format
This commit is contained in:
parent
0011ff9f64
commit
af11c53473
1 changed files with 35 additions and 12 deletions
|
|
@ -21,6 +21,7 @@ The RAG example ([rag.py](./rag.py)) is adapted from the [Official llama index R
|
||||||
Follow the instructions in [GPU Install Guide](https://bigdl.readthedocs.io/en/latest/doc/LLM/Overview/install_gpu.html) to install bigdl-llm.
|
Follow the instructions in [GPU Install Guide](https://bigdl.readthedocs.io/en/latest/doc/LLM/Overview/install_gpu.html) to install bigdl-llm.
|
||||||
|
|
||||||
* **Database Setup (using PostgreSQL)**:
|
* **Database Setup (using PostgreSQL)**:
|
||||||
|
* Linux
|
||||||
* Installation:
|
* Installation:
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get install postgresql-client
|
sudo apt-get install postgresql-client
|
||||||
|
|
@ -28,18 +29,40 @@ The RAG example ([rag.py](./rag.py)) is adapted from the [Official llama index R
|
||||||
```
|
```
|
||||||
* Initialization:
|
* Initialization:
|
||||||
|
|
||||||
Switch to the **postgres** user and launch **psql** console:
|
Switch to the **postgres** user and launch **psql** console
|
||||||
```bash
|
```bash
|
||||||
sudo su - postgres
|
sudo su - postgres
|
||||||
psql
|
psql
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, create a new user role:
|
Then, create a new user role:
|
||||||
```bash
|
```bash
|
||||||
CREATE ROLE <user> WITH LOGIN PASSWORD '<password>';
|
CREATE ROLE <user> WITH LOGIN PASSWORD '<password>';
|
||||||
ALTER ROLE <user> SUPERUSER;
|
ALTER ROLE <user> SUPERUSER;
|
||||||
```
|
```
|
||||||
|
* Windows
|
||||||
|
* click `Download the installer` in [PostgreSQL](https://www.postgresql.org/download/windows/).
|
||||||
|
* Run the downloaded installation package as administrator, then click `next` continuously.
|
||||||
|
* Open PowerShell:
|
||||||
|
```bash
|
||||||
|
cd C:\Program Files\PostgreSQL\14\bin
|
||||||
|
```
|
||||||
|
The exact path will vary depending on your PostgreSQL location.
|
||||||
|
* Then in PowerShell:
|
||||||
|
```bash
|
||||||
|
.\psql -U postgres
|
||||||
|
```
|
||||||
|
Input the password you set in the previous installation. If PowerShell shows `postgres=#`, it indicates a successful connection.
|
||||||
|
* Create a new user role:
|
||||||
|
```bash
|
||||||
|
CREATE ROLE <user> WITH LOGIN PASSWORD '<password>';
|
||||||
|
ALTER ROLE <user> SUPERUSER;
|
||||||
|
```
|
||||||
* **Pgvector Installation**:
|
* **Pgvector Installation**:
|
||||||
Follow installation instructions on [pgvector's GitHub](https://github.com/pgvector/pgvector) and refer to the [installation notes](https://github.com/pgvector/pgvector#installation-notes) for additional help.
|
* Linux
|
||||||
|
* Follow installation instructions on [pgvector's GitHub](https://github.com/pgvector/pgvector) and refer to the [installation notes](https://github.com/pgvector/pgvector#installation-notes) for additional help.
|
||||||
|
* Windows
|
||||||
|
* It is recommended to use [pgvector for Windows](https://github.com/pgvector/pgvector?tab=readme-ov-file#windows) instead of others (such as conda-force) to avoid potential errors. Some steps may require running as administrator.
|
||||||
|
|
||||||
|
|
||||||
* **Data Preparation**: Download the Llama2 paper and save it as `data/llama2.pdf`, which serves as the default source file for retrieval.
|
* **Data Preparation**: Download the Llama2 paper and save it as `data/llama2.pdf`, which serves as the default source file for retrieval.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue