From 49ed0725a837fc8df08167170d171564a22a7d2c Mon Sep 17 00:00:00 2001 From: Ian Stanton Date: Fri, 14 Jul 2023 18:34:04 -0400 Subject: [PATCH] Add RDKit (#225) Co-authored-by: Evan Stanton --- contrib/rdkit/Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ contrib/rdkit/Trunk.toml | 18 ++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 contrib/rdkit/Dockerfile create mode 100644 contrib/rdkit/Trunk.toml diff --git a/contrib/rdkit/Dockerfile b/contrib/rdkit/Dockerfile new file mode 100644 index 00000000..e6c0e869 --- /dev/null +++ b/contrib/rdkit/Dockerfile @@ -0,0 +1,36 @@ +ARG PG_VERSION=15 +FROM quay.io/coredb/c-builder:pg${PG_VERSION} +USER root + +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 \ + cmake \ + gcc \ + libboost-all-dev \ + libfreetype6-dev \ + postgresql-server-dev-all + +ARG RELEASE=Release_2023_03_2 +ARG RDBASE=rdkit-${RELEASE} + +# Build and Install RDKit +RUN wget https://github.com/rdkit/rdkit/archive/${RELEASE}.tar.gz && \ + tar xvf ${RELEASE}.tar.gz && \ + cd ${RDBASE} && \ + mkdir build && \ + cd build && \ + cmake -DRDK_BUILD_PGSQL=ON \ + -DRDK_BUILD_PYTHON_WRAPPERS=OFF \ + -DRDK_BUILD_CPP_TESTS=OFF \ + -DPostgreSQL_CONFIG_DIR=/usr/bin .. && \ + make -j8 diff --git a/contrib/rdkit/Trunk.toml b/contrib/rdkit/Trunk.toml new file mode 100644 index 00000000..3b0dc7a4 --- /dev/null +++ b/contrib/rdkit/Trunk.toml @@ -0,0 +1,18 @@ +[extension] +name = "rdkit" +version = "4.3.0" +repository = "https://github.com/rdkit/rdkit/tree/master/Code/PgSQL/rdkit" +license = "BSD-3-Clause" +description = "Cheminformatics functionality for PostgreSQL." +homepage = "https://www.rdkit.org/" +documentation = "https://www.rdkit.org/docs/index.html" +categories = ["data_transformations"] + +[build] +postgres_version = "15" +platform = "linux/amd64" +dockerfile = "Dockerfile" +install_command = """ + sh rdkit-Release_2023_03_2/build/Code/PgSQL/rdkit/pgsql_install.sh + """ +