Docker support and Ollama support (#47)
- Added support for running CLI and Ollama server via Docker - Introduced tests for local embeddings model and standalone Docker setup - Enabled conditional Ollama server launch via LLM_PROVIDER
This commit is contained in:
74
docker-compose.yml
Normal file
74
docker-compose.yml
Normal file
@@ -0,0 +1,74 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
# Ollama service for local LLM
|
||||
ollama:
|
||||
image: ollama/ollama:latest
|
||||
container_name: ollama
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./ollama_data:/root/.ollama
|
||||
# Uncomment for GPU support
|
||||
# deploy:
|
||||
# resources:
|
||||
# reservations:
|
||||
# devices:
|
||||
# - capabilities: ["gpu"]
|
||||
profiles:
|
||||
- ollama
|
||||
|
||||
# App container for Ollama setup
|
||||
app-ollama:
|
||||
build:
|
||||
context: .
|
||||
container_name: trading-agents-ollama
|
||||
network_mode: host
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./data:/app/data
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- LLM_BACKEND_URL=http://localhost:11434/v1
|
||||
- LLM_PROVIDER=ollama
|
||||
depends_on:
|
||||
- ollama
|
||||
tty: true
|
||||
stdin_open: true
|
||||
profiles:
|
||||
- ollama
|
||||
|
||||
# App container for OpenAI setup (no Ollama dependency)
|
||||
app-openai:
|
||||
build:
|
||||
context: .
|
||||
container_name: trading-agents-openai
|
||||
network_mode: host
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./data:/app/data
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- LLM_PROVIDER=openai
|
||||
- LLM_BACKEND_URL=https://api.openai.com/v1
|
||||
tty: true
|
||||
stdin_open: true
|
||||
profiles:
|
||||
- openai
|
||||
|
||||
# Generic app container (uses .env settings as-is)
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
container_name: trading-agents
|
||||
network_mode: host
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./data:/app/data
|
||||
env_file:
|
||||
- .env
|
||||
tty: true
|
||||
stdin_open: true
|
||||
profiles:
|
||||
- default
|
||||
Reference in New Issue
Block a user