Overview
This Docker Compose environment provides a local lab setup to test Generative AI (GenAI) models and applications. It includes:
- Jailbreak Prevention Service
- Demo Application UI
- Ollama Local Models
- Demo RaG App
- Demo Tool Agents
- Demo Text2Sql Agent
Prerequisitesโ
Setup Instructionsโ
1. Clone the Repositoryโ
git clone https://github.com/detoxio-ai/dtx_vuln_lab.git
cd dtx_vuln_lab
2. Create your .env
file from the templateโ
cp .env.template .env
3. Edit the .env
file and provide required valuesโ
- Set your
OPENAI_API_KEY
- (Optional) Adjust ports and other variables
- Define models to preload in
OLLAMA_MODELS_TO_DOWNLOAD
(comma-separated)
Example .env
Snippet:
OPENAI_API_KEY=your-openai-key
## Keep other variables as default
4. Start the environmentโ
docker-compose up -d
5. Verify services are runningโ
docker-compose ps
6. Run Ollama commands using Docker Composeโ
docker-compose exec ollama ollama list
You can replace ollama list
with any other Ollama command.
Services Overviewโ
Service | Description | Default URL |
---|---|---|
Jailbreak Prevention Service | Provides prompt safety and filtering for GenAI inputs | http://localhost:8000 |
Demo App | Web UI to interact with and test Demo Chat App | http://localhost:17860 |
Demo RaG App | Web UI to interact with and test Demo Rag App | http://localhost:17861 |
Ollama Models | Local language models runtime for testing without external LLM APIs | http://localhost:11434 |
Demo Tool Agents | Interactive tool agent demo for prompt engineering and testing | http://localhost:17862 |
Demo Text2Sql Agents | Interactive Text2SQL agent for structured queries | http://localhost:17863 |
Notesโ
- The
ollama-model-downloader
service pulls models listed inOLLAMA_MODELS_TO_DOWNLOAD
(set in.env
) when the stack starts. - All services include health checks and proper startup sequencing.
- Models are stored in
${HOME}/.ollama
for persistence across runs.
export OLLAMA_HOST=localhost:11435
To access Ollama from your local Ollama CLI, ensure the OLLAMA_HOST
environment variable is set as shown above.