diff --git a/.env.example b/.env.example index 100d87c1..e5dfe265 100644 --- a/.env.example +++ b/.env.example @@ -19,3 +19,8 @@ QUICK_THINK_LLM=gpt-4o-mini # App settings APP_HOST=localhost APP_PORT=8000 + +# Redis +REDIS_HOST=redis +REDIS_PORT=6379 +REDIS_PASSWORD=password diff --git a/README.md b/README.md index 4173bf5e..56cde910 100644 --- a/README.md +++ b/README.md @@ -109,23 +109,25 @@ conda activate tradingagents pyenv pyenv local 3.12.7 python -m venv .venv -source./venv/bin/activate -python --version -pip install --upgrade pip -pip install -r requirements.txt -pip list - -# daily use source .venv/bin/activate +python --version +python -m pip install --upgrade pip +python -m pip install -r requirements.txt +python -m pip list + deactivate if error mini-racer -source venv/bin/activate && pip install --no-deps -r requirements.txt #install without miniracer +source .venv/bin/activate && pip install --no-deps -r requirements.txt #install without miniracer + +Api +python webapp.py ``` -Install dependencies: -```bash -pip install -r requirements.txt +### Connect to Redis (Local) +``` +docker-compose up -d +redis-cli -h localhost -p 6379 -a {REDIS_PASSWORD} ``` ### Required APIs @@ -239,8 +241,3 @@ Please reference our work if you find *TradingAgents* provides you with some hel url={https://arxiv.org/abs/2412.20138}, } ``` - -## How to Run -``` -python3 webapp.py -``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..14e2dbc7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +services: + redis: + image: redis:7.4.7 + container_name: ${REDIS_CONTAINER_NAME:-trading_agents_redis} + restart: unless-stopped + ports: + - "6379:6379" + volumes: + - redis-data:/data + environment: + REDIS_PASSWORD: ${REDIS_PASSWORD} + command: > + redis-server + --appendonly yes + --requirepass ${REDIS_PASSWORD} + +volumes: + redis-data: