在 macOS 上安装 Redis 可以通过 Homebrew 进行安装。以下是安装步骤:

  1. 打开终端应用程序(Terminal)。

  2. 确保已安装 Homebrew,如果未安装,请在终端中运行以下命令安装 Homebrew:

In [ ]:
%%bash
$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
  1. 安装 Redis。在终端中运行以下命令:
In [ ]:
%%bash
brew install redis
  1. 安装完成后,运行以下命令启动 Redis 服务器:
In [ ]:
%%bash
brew services start redis

此时 Redis 服务器应已成功启动。

如果需要停止 Redis 服务器,请在终端中运行以下命令:

In [ ]:
%%bash
brew services stop redis

如果需要卸载 Redis,请在终端中运行以下命令:

In [ ]:
%%bash
brew uninstall redis
In [ ]:
%env USE_GPU=False
%env CELERY_BROKER_URL=redis://localhost:6379
In [ ]:
# https://github.com/corca-ai/EVAL/blob/main/api/main.py
executor = agent_manager.create_executor(session)
In [ ]:
%%bash
curl -X POST -H "Content-Type: application/json" -d '{"session": "sessionid", "files": [], "prompt": "Hi there!"}' http://localhost:8000/api/execute

Comments

2023-04-11