Closed ZDF64 closed 7 months ago
内核太低了
内核太低了
您的意思,就是系统版本太久了,是么
折腾了一晚上,查阅到了相关一个资料 https://qiita.com/Y__Mori/items/51090da0fe13520ac14a 需要特殊的postgres版本,也就是postgres:15-bullseye 于是我下载了git@github.com:pgvector/pgvector.git 更改了Dockerfile ------------Dockerfile--------------
ARG PG_MAJOR=15-bullseye
FROM postgres:$PG_MAJOR
ARG PG_MAJOR
COPY . /tmp/pgvector
RUN apt-get update && \
apt-mark hold locales && \
apt-get install -y --no-install-recommends build-essential postgresql-server-dev-$PG_MAJOR && \
cd /tmp/pgvector && \
make clean && \
make OPTFLAGS="" && \
make install && \
mkdir /usr/share/doc/pgvector && \
cp LICENSE README.md /usr/share/doc/pgvector && \
rm -r /tmp/pgvector && \
apt-get remove -y build-essential postgresql-server-dev-$PG_MAJOR && \
apt-get autoremove -y && \
apt-mark unhold locales && \
rm -rf /var/lib/apt/lists/*
------------Dockerfile--------------
重新制作镜像放到本地库
然后在修改docker-compose.yml引入刚才做好的image
之后再启动就不报错了,FastGPT也能正常登陆了
折腾了一晚上,查阅到了相关一个资料 https://qiita.com/Y__Mori/items/51090da0fe13520ac14a 需要特殊的postgres版本,也就是postgres:15-bullseye 于是我下载了git@github.com:pgvector/pgvector.git 更改了Dockerfile ------------Dockerfile--------------
ARG PG_MAJOR=15-bullseye
FROM postgres:$PG_MAJOR
ARG PG_MAJOR
COPY . /tmp/pgvector
RUN apt-get update && \
apt-mark hold locales && \
apt-get install -y --no-install-recommends build-essential postgresql-server-dev-$PG_MAJOR && \
cd /tmp/pgvector && \
make clean && \
make OPTFLAGS="" && \
make install && \
mkdir /usr/share/doc/pgvector && \
cp LICENSE README.md /usr/share/doc/pgvector && \
rm -r /tmp/pgvector && \
apt-get remove -y build-essential postgresql-server-dev-$PG_MAJOR && \
apt-get autoremove -y && \
apt-mark unhold locales && \
rm -rf /var/lib/apt/lists/*
------------Dockerfile-------------- 重新制作镜像放到本地库 然后在修改docker-compose.yml引入刚才做好的image 之后再启动就不报错了,FastGPT也能正常登陆了
大佬牛逼。 这个确实挺坑的,我之前 centos7 也初始化不了。 后面是找了个 unbuntu 运行后,直接把 data 目录拷贝回去,这样就不用初始化了。
引用之前 issue https://github.com/labring/FastGPT/issues/784
据说增加 privileged=true 也可以解决
例行检查
你的版本
问题描述 按照docker-compose部署方法启动后,打印日志发现后台报错 pg | popen failure: Cannot allocate memory pg | initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb"
这个问题导致ankane/pgvector:v0.5.0反复重启,无法正常运作
但同样,我在windows环境中部署则没有发生问题 FastGPT功能正常,log中也没有报错信息 复现步骤 环境:CentOS 7.9
预期结果
相关截图