A Docker image providing PostgreSQL 18 with vector extensions for AI/ML workloads.
- PostgreSQL 18 - Latest stable PostgreSQL version
- pgvector - Vector similarity search (from
pgvector/pgvector:0.8.1-pg18-trixie) - pgvectorscale - Time-series vector compression (built from source)
- Semantic versioning - Managed via Poetry
- Local automation - Via pypyr workflows
- Multi-arch builds - amd64 + arm64 via GitHub Actions
| Tag | Description |
|---|---|
18-vX.Y.Z |
Versioned release bound to PostgreSQL 18 |
18-latest |
Latest stable release for PostgreSQL 18 |
docker.io/imprvai/imprv_pgvectorscale:18-v0.1.0
docker.io/imprvai/imprv_pgvectorscale:18-latestdocker run --rm -it \
-e POSTGRES_PASSWORD=secret \
-p 5432:5432 \
docker.io/imprvai/imprv_pgvectorscale:18-latestOn first initialization with a fresh data volume:
- ✅ pgvector is pre-installed (from base image)
- ✅ vectorscale is installed via
init_vectorscale.sql - ✅ vectorscale is preloaded via
shared_preload_libraries
Verify extensions are available:
SELECT * FROM pg_available_extensions
WHERE name IN ('vector', 'vectorscale');
SELECT * FROM pg_extension
WHERE extname IN ('vector', 'vectorscale');Version source of truth: pyproject.toml
[tool.poetry]
version = "X.Y.Z"Bump version locally:
pypyr release part=patch # or part=minor / part=majorThis automated workflow will:
- Bump version in
pyproject.tomlusing Poetry - Build Docker images with tags:
18-vX.Y.Z18-latest
- Push images to Docker Hub
- Update
CHANGELOG.mdwith commits since previous tag - Commit
pyproject.tomlandCHANGELOG.md - Create git tag
vX.Y.Z - Push commit and tag (if git credentials configured)
Commands can be run from the project root using pypyr shortcuts:
# Single-arch build (default, faster, for local testing)
pypyr build
# Multi-arch build (amd64 + arm64, requires docker buildx)
# Note: Multi-arch builds push images to registry (can't load locally)
pypyr build multiarch=true push=truepypyr push# Single-arch release (default, builds locally, then pushes)
pypyr release part=patch
# Multi-arch release (amd64 + arm64, builds and pushes to registry)
pypyr release part=patch multiarch=trueIncludes: version bump + build + push + changelog + git tag/push
Note: When using
multiarch=true, images are automatically pushed during build (required for multi-arch manifests). Single-arch builds are loaded locally first, then pushed separately.
Note:
- Shortcuts are defined in
pyproject.tomlunder[tool.pypyr.shortcuts]- Multi-arch builds require
docker buildxand are slower (uses QEMU emulation)- Multi-arch builds push images to registry (can't be loaded locally like single-arch)
- GitHub Actions always builds multi-arch by default
Workflow: .github/workflows/pr-build-test.yaml
- Automatic: Runs on Pull Requests (opened, updated, reopened)
- Paths: Only triggers on changes to
docker/,.github/workflows/,pyproject.toml, orops/
- Build Docker image (without pushing)
- Test PostgreSQL startup - Verifies container starts successfully
- Test extensions - Verifies
vectorandvectorscaleextensions are available and can be installed - Verify preload - Checks that vectorscale is properly configured
Note: Images are built with tag
pr-{PR_NUMBER}for testing purposes only. No images are pushed to registry.
Workflow: .github/workflows/release.yaml
- Manual trigger:
workflow_dispatchfrom GitHub UI - Input:
part=major|minor|patch
- Prepare release - Bump version, update changelog, commit, create tag (using
pypyr release-prep) - Build & push multi-arch images (amd64 + arm64) using
docker/build-push-action - Push commit & tag to repository
Tags pushed:
18-vX.Y.Z18-latest
Note:
- CI/CD always builds and pushes multi-arch images (amd64 + arm64)
- Local release workflow (
pypyr release) builds single-arch images by default (faster for testing)- Use
multiarch=trueflag for local multi-arch builds:pypyr release part=patch multiarch=true
This project is licensed under the MIT License.