Files
AIclinicalresearch/Dockerfile.postgres-with-extensions
HaHafeng 303dd78c54 feat(aia): Protocol Agent MVP complete with one-click generation and Word export
- Add one-click research protocol generation with streaming output

- Implement Word document export via Pandoc integration

- Add dynamic dual-panel layout with resizable split pane

- Implement collapsible content for StatePanel stages

- Add conversation history management with title auto-update

- Fix scroll behavior, markdown rendering, and UI layout issues

- Simplify conversation creation logic for reliability
2026-01-25 19:16:36 +08:00

58 lines
1.7 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PostgreSQL 15 with pgvector + pg_bigm extensions
# 用于 AI 临床研究平台的向量检索和中文关键词检索
#
# 扩展版本:
# - pgvector: 0.8.1 (向量相似度搜索)
# - pg_bigm: 1.2 (中日韩文本全文搜索)
#
# 构建命令:
# docker build -f Dockerfile.postgres-with-extensions -t ai-clinical-postgres:v1.1 .
#
# 使用方法:
# 1. 构建镜像后,修改 docker-compose.yml:
# image: ai-clinical-postgres:v1.1
# 2. 重启服务docker compose down && docker compose up -d
# 3. 启用扩展:
# docker exec -it ai-clinical-postgres psql -U postgres -d ai_clinical_research -c "CREATE EXTENSION IF NOT EXISTS pg_bigm;"
FROM pgvector/pgvector:pg15
# 使用阿里云镜像源加速(如果在国内)
# RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/*.sources 2>/dev/null || true
# 安装编译依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
postgresql-server-dev-15 \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 下载并编译 pg_bigm
# pg_bigm 是专门为中日韩CJK字符优化的全文搜索扩展
RUN cd /tmp \
&& wget -q https://github.com/pgbigm/pg_bigm/archive/refs/tags/v1.2-20200228.tar.gz \
&& tar -xzf v1.2-20200228.tar.gz \
&& cd pg_bigm-1.2-20200228 \
&& make USE_PGXS=1 \
&& make USE_PGXS=1 install \
&& cd / \
&& rm -rf /tmp/pg_bigm* /tmp/v1.2-20200228.tar.gz
# 清理编译依赖
RUN apt-get purge -y --auto-remove \
build-essential \
postgresql-server-dev-15 \
wget \
&& rm -rf /var/lib/apt/lists/*
# 添加初始化脚本(自动创建扩展)
COPY docker-init-extensions.sql /docker-entrypoint-initdb.d/
# 暴露端口
EXPOSE 5432