mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 15:16:54 +08:00
Added Dockerfile - #4 [skip ci]
This commit is contained in:
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM postgres
|
||||||
|
|
||||||
|
COPY . /tmp/pgvector
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends build-essential postgresql-server-dev-13 && \
|
||||||
|
cd /tmp/pgvector && \
|
||||||
|
make clean && \
|
||||||
|
make OPTFLAGS="" && \
|
||||||
|
make install && \
|
||||||
|
mkdir /usr/share/doc/pgvector && \
|
||||||
|
cp LICENSE README.md /usr/share/doc/pgvector && \
|
||||||
|
rm -r /tmp/pgvector && \
|
||||||
|
apt-get remove -y build-essential postgresql-server-dev-13 && \
|
||||||
|
apt-get autoremove -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
20
README.md
20
README.md
@@ -29,7 +29,7 @@ Then load it in databases where you want to use it
|
|||||||
CREATE EXTENSION vector;
|
CREATE EXTENSION vector;
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also install it with [Homebrew](#homebrew) or [PGXN](#pgxn)
|
You can also install it with [Docker](#docker), [Homebrew](#homebrew), or [PGXN](#pgxn)
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
@@ -140,6 +140,24 @@ Libraries that use pgvector:
|
|||||||
|
|
||||||
## Additional Installation Methods
|
## Additional Installation Methods
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
Get the [Docker image](https://hub.docker.com/repository/docker/ankane/pgvector) with:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull ankane/pgvector
|
||||||
|
```
|
||||||
|
|
||||||
|
This adds pgvector to the [Postgres image](https://hub.docker.com/_/postgres).
|
||||||
|
|
||||||
|
You can also build the image manually
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/ankane/pgvector.git
|
||||||
|
cd pgvector
|
||||||
|
docker build -t pgvector .
|
||||||
|
```
|
||||||
|
|
||||||
### Homebrew
|
### Homebrew
|
||||||
|
|
||||||
On Mac with Homebrew Postgres, you can use:
|
On Mac with Homebrew Postgres, you can use:
|
||||||
|
|||||||
Reference in New Issue
Block a user