A container image combining a Postgresql database (9.6) with rdkit Postgresql cartridge.
1.8K
I removed the image tagged "9.6", since with 9.6.2 a newer, non-breaking update of Postgresql is available. Dropping a running 9.6 container, pulling 9.6.2 and recreating the container using the same command works flawlessly. No data migration necessary, AFAICT.
git clone -b master --single-branch https://github.com/spitzenidee/postgresql_rdkit.git docker build -t postgresql_rdkit:9.6 postgresql_rdkit
The Dockerfile underlying this build / image can be found on Github: https://github.com/spitzenidee/postgresql_rdkit
Automated builds for this image sadly fail each time, due to resource restrictions on DockerHub for that process - it always timed out after 2 hours, and if not it still failed. Hence, I had to build it on my local machine and push it manually. 32 cores to the rescue ;-)
This image is deducted from the great work of InformaticsMatters (https://hub.docker.com/r/informaticsmatters/rdkit_cartridge/). However I had problems with directory / file permission on "docker run", plus I wanted to have the most current Postgresql version for my rdkit ventures. So I updated and amended the Dockerfile where appropriate.
Be aware that this build is a really fat one (1.08GB at the moment). I do not plan on moving towards Alpine Linux (https://alpinelinux.org/) since I don't think the extra effort of dealing with manual installation / building of numerous dependencies (libboost, numpy, etc) is worth a few hundred megabytes.
nproc".After pulling the image, running a container similar to the following should work:
docker run -d --name postgresql_rdkit --restart unless-stopped -p 5432:5432 -v <static_pgsql_files>:/var/lib/postgresql/data spitzenidee/postgresql_rdkit:latest
This command...:
In case you'd like to exchange data with the host for e.g. importing schema dumps, you can map a second volume into the container by adding something as follows to make huge data available in the inside:
[...] -v /opt/data_exchange:/opt/data_exchange [...]
You may then connect to the database with your favorite management tool or via console and create new rdkit-enabled schemata like the following:
psql -h localhost -U postgres -c "CREATE SCHEMA chemical" psql -h localhost -U postgres -c "CREATE EXTENSION rdkit WITH SCHEMA chemical"
...which boils down to the two DDL commands:
CREATE SCHEMA chemical CREATE EXTENSION rdkit WITH SCHEMA chemical
Content type
Image
Digest
Size
390.8 MB
Last updated
over 8 years ago
docker pull spitzenidee/postgresql_rdkit