deepflow部署

张开发
2026/4/14 16:33:03 15 分钟阅读

分享文章

deepflow部署
文章主要介绍如何在linux上部署deepflow环境要求Python 3.12Node.js 22足够的内存和GPU资源建议16GB内存以上配置环境# install Node.js 22 curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt-get install -y nodejs # install uv curl -LsSf https://astral.sh/uv/install.sh | sh下载deepflow以及创建需要的环境# clone 仓库 git clone https://github.com/bytedance/deer-flow.git cd deer-flow # create anaconda环境 conda create --prefix/yourpath/envs/deerflow python3.12 # activate anaconda环境 conda activate /yourpath/envs/deerflow生成本地配置文件在项目根目录deer-flow/执行make config配置.env(该文件为隐藏文件)# 使用vim编辑器打开.env vim .env使用tavily或查看文档介绍info questhttps://docs.byteplus.com/en/docs/InfoQuest/What_is_Info_Quest以下为tavily的网址需注册并生成apikeyhttps://www.tavily.com/此处提前配置两个密钥因为作者是使用tavily(有免费额度)和deepseek所以需要这两个密钥TAVILY_API_KEYyour-Tavily-api-key # Jina API Key # JINA_API_KEYyour-jina-api-key # InfoQuest API Key # INFOQUEST_API_KEYyour-infoquest-api-key # CORS Origins (comma-separated) - e.g., http://localhost:3000,http://localhost:3001 # CORS_ORIGINShttp://localhost:3000 # Optional: # FIRECRAWL_API_KEYyour-firecrawl-api-key # VOLCENGINE_API_KEYyour-volcengine-api-key # OPENAI_API_KEYyour-openai-api-key # GEMINI_API_KEYyour-gemini-api-key DEEPSEEK_API_KEYyour-deepseek-api-key # NOVITA_API_KEYyour-novita-api-key # OpenAI-compatible, see https://novita.ai # MINIMAX_API_KEYyour-minimax-api-key # OpenAI-compatible, see https://platform.minimax.io # VLLM_API_KEYyour-vllm-api-key # OpenAI-compatible # FEISHU_APP_IDyour-feishu-app-id # FEISHU_APP_SECRETyour-feishu-app-secret # SLACK_BOT_TOKENyour-slack-bot-token # SLACK_APP_TOKENyour-slack-app-token # TELEGRAM_BOT_TOKENyour-telegram-bot-token # Enable LangSmith to monitor and debug your LLM calls, agent runs, and tool executions. # LANGSMITH_TRACINGtrue # LANGSMITH_ENDPOINThttps://api.smith.langchain.com # LANGSMITH_API_KEYyour-langsmith-api-key # LANGSMITH_PROJECTyour-langsmith-project # GitHub API Token # GITHUB_TOKENyour-github-token # WECOM_BOT_IDyour-wecom-bot-id # WECOM_BOT_SECRETyour-wecom-bot-secret配置config.yaml(以deepseek为例)- name: deepseek-v3 display_name: DeepSeek V3 (Thinking) use: deerflow.models.patched_deepseek:PatchedChatDeepSeek model: deepseek-reasoner api_key: $DEEPSEEK_API_KEY timeout: 600.0 max_retries: 2 max_tokens: 8192 supports_thinking: true supports_vision: false # DeepSeek V3 does not support vision when_thinking_enabled: extra_body: thinking: type: enabled when_thinking_disabled: extra_body: thinking: type: disabled也就是放开这部分的注释运行应用确保nodejs 22uv安装nvm# install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # load environment export NVM_DIR$HOME/.nvm [ -s $NVM_DIR/nvm.sh ] \. $NVM_DIR/nvm.sh # verify nvm -v # install nodejs NVM_NODEJS_ORG_MIRRORhttps://npmmirror.com/mirrors/node/ nvm install 22 nvm use 22 # install pnpm corepack enable corepack prepare pnpmlatest --activate # fresh environment source ~/.bashrc # install nginx sudo apt update sudo apt install -y nginx若出现版本问题可以使用下面的代码强行安装并切换nodejs版本NVM_NODEJS_ORG_MIRRORhttps://npmmirror.com/mirrors/node/ nvm install v22.14.0以及安装必要的uvpip install uv检查依赖环境make check安装依赖make install安装完毕后启动服务make dev部署完毕

更多文章