Last active
January 16, 2025 18:36
-
-
Save K-Mistele/34ca819d9d2df12acbb6ce2f0ebc5dd7 to your computer and use it in GitHub Desktop.
Dockerfile for pgvector (postgres 16) + vectorscale by Timescale DB. Only what you need, no other timescale stuff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM pgvector/pgvector:pg16 | |
# install prerequisites | |
## rust | |
RUN apt-get update | |
RUN apt-get install -y build-essential curl git jq make gcc pkg-config clang postgresql-server-dev-16 libssl-dev | |
RUN apt-get update | |
# Get Rust | |
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | |
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc | |
SHELL ["/bin/bash", "-l", "-c"] | |
#download, build and install pgvectorscale | |
WORKDIR /opt | |
RUN git clone https://github.com/timescale/pgvectorscale | |
WORKDIR /opt/pgvectorscale/pgvectorscale | |
## cargo-pgrx with the same version as pgrx | |
RUN bash -c "cargo install --locked cargo-pgrx --version $(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "pgrx") | .version') && \ | |
cargo pgrx init --pg16 pg_config && \ | |
cargo pgrx install --release" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment