mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-04 14:42:13 +08:00
Add psycopg dependencies instruction for checkpointing (#564)
* Add psycopg dependencies instruction for checkpointing * fix: update Dockerfile to improve dependency installation process
This commit is contained in:
@@ -3,6 +3,11 @@ FROM ghcr.io/astral-sh/uv:python3.12-bookworm
|
||||
# Install uv.
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
|
||||
# Install system dependencies including libpq
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Pre-cache the application dependencies.
|
||||
|
||||
15
README.md
15
README.md
@@ -392,11 +392,24 @@ This will enable trace visualization in LangGraph Studio and send your traces to
|
||||
3. Supports saving and loading checkpoints for workflow execution.
|
||||
4. Supports saving chat stream events for replaying conversations.
|
||||
|
||||
Note:
|
||||
*Note: About langgraph issue #5557*
|
||||
The latest langgraph-checkpoint-postgres-2.0.23 have checkpointing issue, you can check the open issue:"TypeError: Object of type HumanMessage is not JSON serializable" [https://github.com/langchain-ai/langgraph/issues/5557].
|
||||
|
||||
To use postgres checkpoint you should install langgraph-checkpoint-postgres-2.0.21
|
||||
|
||||
*Note: About psycopg dependencies*
|
||||
Please read the following document before using postgres: https://www.psycopg.org/psycopg3/docs/basic/install.html
|
||||
|
||||
BY default, psycopg needs libpq to be installed on your system. If you don't have libpq installed, you can install psycopg with the `binary` extra to include a statically linked version of libpq mannually:
|
||||
|
||||
```bash
|
||||
pip install psycopg[binary]
|
||||
```
|
||||
This will install a self-contained package with all the libraries needed, but binary not supported for all platform, you check the supported platform : https://pypi.org/project/psycopg-binary/#files
|
||||
|
||||
if not supported, you can select local-installation: https://www.psycopg.org/psycopg3/docs/basic/install.html#local-installation
|
||||
|
||||
|
||||
The default database and collection will be automatically created if not exists.
|
||||
Default database: checkpoing_db
|
||||
Default collection: checkpoint_writes_aio (langgraph checkpoint writes)
|
||||
|
||||
Reference in New Issue
Block a user