setup redis client

This commit is contained in:
mhmmdjafarg 2025-12-30 16:49:43 +07:00
parent 9574a6dd68
commit 9b291d97ea
3 changed files with 36 additions and 16 deletions

View File

@ -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

View File

@ -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
```

18
docker-compose.yml Normal file
View File

@ -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: