跳到主要内容
用户可以在从父 LangGraph 镜像导入后,向 Dockerfile 添加一系列额外的行。为此,您只需通过将要运行的命令传递到 dockerfile_lines 键来修改您的 langgraph.json 文件。例如,如果我们要在图中使用 Pillow,您需要添加以下依赖项
{
    "dependencies": ["."],
    "graphs": {
        "openai_agent": "./openai_agent.py:agent",
    },
    "env": "./.env",
    "dockerfile_lines": [
        "RUN apt-get update && apt-get install -y libjpeg-dev zlib1g-dev libpng-dev",
        "RUN pip install Pillow"
    ]
}
如果我们在使用 jpegpng 图像格式,这将安装使用 Pillow 所需的系统包。
以编程方式连接这些文档到 Claude、VSCode 等,通过 MCP 获取实时答案。
© . This site is unofficial and not affiliated with LangChain, Inc.