-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Evan Stanton <evan.h.stanton@gmail.com>
- Loading branch information
1 parent
e22ff57
commit c73e987
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
ARG PG_VERSION=15 | ||
FROM quay.io/coredb/pgrx-builder:pg${PG_VERSION}-pgrx0.9.7 | ||
USER root | ||
# quay.io/coredb/pgrx-builder:pg15-pgrx0.9.7 | ||
# Extension build dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
libreadline-dev \ | ||
zlib1g-dev \ | ||
flex \ | ||
bison \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
libssl-dev \ | ||
libxml2-utils \ | ||
xsltproc \ | ||
ccache \ | ||
python3-dev \ | ||
clang \ | ||
cmake \ | ||
libclang-dev \ | ||
libopenblas-dev \ | ||
libpython3-dev \ | ||
pkg-config | ||
|
||
# Install Rust | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
|
||
# Set default Rust version | ||
RUN /root/.cargo/bin/rustup default stable | ||
|
||
# Clone repository | ||
RUN git clone https://github.com/postgresml/postgresml.git | ||
|
||
ARG RELEASE=v2.7.1 | ||
|
||
RUN cd postgresml && \ | ||
git submodule update --init --recursive && \ | ||
git fetch origin ${RELEASE} && \ | ||
git checkout ${RELEASE} && \ | ||
cd pgml-extension && \ | ||
cargo pgrx init --pg15 /usr/bin/pg_config && \ | ||
cargo pgrx package |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[extension] | ||
name = "pgml" | ||
version = "2.7.1" | ||
repository = "https://github.com/postgresml/postgresml" | ||
license = "MIT" | ||
description = "PostgresML is a machine learning extension to PostgreSQL that enables you to perform training and inference on text and tabular data using SQL queries." | ||
homepage = "https://postgresml.org/" | ||
documentation = "https://postgresml.org/docs/guides/setup/quick_start_with_docker" | ||
categories = ["machine_learning"] | ||
|
||
[build] | ||
postgres_version = "15" | ||
platform = "linux/amd64" | ||
dockerfile = "Dockerfile" | ||
install_command = """ | ||
cd postgresml/pgml-extension | ||
mv target/release/pgml-pg15/usr/lib/postgresql/15/lib/* /usr/lib/postgresql/15/lib | ||
mv target/release/pgml-pg15/usr/share/postgresql/15/extension/* /usr/share/postgresql/15/extension | ||
""" |