You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository makes it easy to deploy a PostgreSQL Flexible Server to Azure with the [pgvector](https://pgvector.dev) extension installed. The pgvector extension provides a vector similarity search engine for PostgreSQL, allowing you to perform similarity searches on your data using vector embeddings.
17
+
This repository makes it easy to deploy a PostgreSQL Flexible Server to Azure with the [pgvector](https://github.com/pgvector/pgvector) extension installed. The pgvector extension provides a vector similarity search engine for PostgreSQL, allowing you to perform similarity searches on your data using vector embeddings.
18
18
19
-
The repository contains infrastructure-as-code (Bicep) to deploy an Azure PostgreSQL Flexible Server with pgvector extension enabled, password authentication disabled, and Entra (Active Directory) authentication enabled. The repository also contains example Python scripts to demonstrate how to use pgvector.
19
+
The repository contains infrastructure-as-code (Bicep) to deploy an Azure PostgreSQL Flexible Server with pgvector extension enabled, password authentication disabled, and Entra (Active Directory) authentication enabled. The repository also contains example Python scripts to demonstrate how to use pgvector.
20
20
21
21
Table of contents:
22
22
@@ -30,8 +30,7 @@ Table of contents:
30
30
## Opening this project
31
31
32
32
You have a few options for setting up this project.
33
-
The easiest way to get started is GitHub Codespaces, since it will setup all the tools for you,
34
-
but you can also [set it up locally](#local-environment) if desired.
33
+
The easiest way to get started is GitHub Codespaces, since it will setup all the tools for you, but you can also [set it up locally](#local-environment) if desired.
35
34
36
35
### GitHub Codespaces
37
36
@@ -45,9 +44,9 @@ Once the codespace opens (this may take several minutes), open a terminal window
45
44
46
45
A related option is VS Code Dev Containers, which will open the project in your local VS Code using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers):
47
46
48
-
1. Start Docker Desktop (install it if not already installed)
47
+
1. Start Docker Desktop (install it if not already installed).
49
48
1. Open the project:
50
-
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-postgres-pgvector-python)
49
+
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-postgres-pgvector-python).
51
50
1. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
52
51
53
52
### Local environment
@@ -101,7 +100,7 @@ Follow these steps to deploy a PostgreSQL Flexible Server to Azure with the pgve
101
100
102
101
This will create a new resource group, and create the PostgreSQL Flexible server inside that group.
103
102
104
-
1. Once the deployment is complete, run this commandto copy the `azd` environment variables into your local`.env`:
103
+
1. The example Python scripts look forconfiguration variables from a `.env` file locatedinthe directory from where you invoke the scripts. You can easily create a file with the correct variables for your PostgreSQL server by running this commandthat copies the `azd` environment variables into your local`.env`:
105
104
106
105
```shell
107
106
azd env get-values > .env
@@ -113,11 +112,11 @@ Follow these steps to deploy a PostgreSQL Flexible Server to Azure with the pgve
113
112
python examples/sqlalchemy_async.py
114
113
```
115
114
116
-
Note that each of the script starts off with a `CREATE EXTENSION vector;` command, which will install the pgvector extension into the database. Once you run that once, you do not need to run it again.
115
+
Note that each of the script starts off with a `CREATE EXTENSION vector;` command, which will install the pgvector extension into the database. Once you run that oncein a given database, you do not need to run it againfor that particular database.
117
116
118
117
## Example scripts
119
118
120
-
The `examples` folder contains example Python scripts that demonstrate how to use pgvector,based on the [pgvector sample code](https://github.com/pgvector/pgvector-python).
119
+
The `examples` folder contains example Python scripts that demonstrate how to use pgvector,based on the [pgvector sample code](https://github.com/pgvector/pgvector-python).
0 commit comments