MCPcopy Index your code
hub / github.com/IBM/ares

github.com/IBM/ares @v0.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.1 ↗ · + Follow
1,285 symbols 5,228 edges 202 files 951 documented · 74%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ARES GUI Docker Setup

This guide explains how to run the ARES GUI using Docker.

What's Included

The Docker setup includes: - Multi-stage build for optimized image size and security - Non-root user for enhanced security - Red Hat UBI 10 base for enterprise-grade reliability - Python 3.12 with all ARES dependencies - Automatic file creation for missing assets (styles.css, favicon)

Prerequisites

  • Docker installed on your system (Get Docker)
  • At least 8GB of RAM available for Docker
  • 10GB of free disk space

Known Issues Fixed

The Dockerfile automatically handles these gui.py dependencies: 1. Line 650: Creates styles.css if missing 2. Line 655: Creates docs/source/_static/ directory structure 3. Line 658: Creates placeholder favicon.ico if missing

Quick Start

1. Build the Docker Image

From the ARES project root directory, build the Docker image:

docker build -t ares-gui .

This will: - Install Python 3.11 and system dependencies - Install ARES and all required Python packages - Copy necessary files (GUI, assets, example configs) - Set up the environment to run the GUI

2. Run the Container

Run the ARES GUI container with volume mounts to persist results:

docker run -d \
  --name ares-gui \
  -p 8081:8081 \
  -v $(pwd)/results:/app/results \
  -v $(pwd)/example_configs:/app/example_configs \
  -v $(pwd)/assets:/app/assets \
  ares-gui

Flags explained: - -d: Run in detached mode (background) - --name ares-gui: Name the container for easy reference - -p 8081:8081: Map port 8081 from container to host - -v: Mount volumes to persist data and access configs

3. Access the GUI

Open your browser and navigate to:

http://localhost:8081

You should see the ARES GUI interface with 5 tabs: - 📝 Configuration - 📊 Data - 🔌 Plugins - 🎯 Red Team - 📈 Reports

Container Management

View Logs

docker logs -f ares-gui

Stop the Container

docker stop ares-gui

Start the Container Again

docker start ares-gui

Remove the Container

docker stop ares-gui
docker rm ares-gui

Rebuild After Changes

If you modify the code or configuration:

docker stop ares-gui
docker rm ares-gui
docker build -t ares-gui .
docker run -d --name ares-gui -p 8081:8081 \
  -v $(pwd)/results:/app/results \
  -v $(pwd)/example_configs:/app/example_configs \
  -v $(pwd)/assets:/app/assets \
  ares-gui

Advanced Usage

Run with Custom Port

To use a different port (e.g., 8080):

docker run -d \
  --name ares-gui \
  -p 8080:8081 \
  -v $(pwd)/results:/app/results \
  ares-gui

Then access at http://localhost:8080

Run with Resource Limits

Limit CPU and memory usage:

docker run -d \
  --name ares-gui \
  --cpus="4" \
  --memory="8g" \
  -p 8081:8081 \
  -v $(pwd)/results:/app/results \
  ares-gui

Interactive Shell Access

To access the container shell for debugging:

docker exec -it ares-gui /bin/bash

Run in Foreground (for debugging)

To see output directly in your terminal:

docker run --rm \
  --name ares-gui \
  -p 8081:8081 \
  -v $(pwd)/results:/app/results \
  ares-gui

Press Ctrl+C to stop.

Volume Mounts Explained

The Docker setup uses volume mounts to:

  1. results/: Persist evaluation results outside the container
  2. All test results and reports are saved here
  3. Survives container restarts and rebuilds

  4. example_configs/: Access configuration files

  5. Upload and modify configs from the GUI
  6. Share configs between host and container

  7. assets/: Access test data and resources

  8. Test prompts, attack goals, and other assets
  9. Required for running evaluations

Troubleshooting

Port Already in Use

If port 8081 is already in use:

# Find what's using the port
lsof -i :8081

# Use a different port
docker run -d --name ares-gui -p 8082:8081 -v $(pwd)/results:/app/results ares-gui

Container Won't Start

Check logs for errors:

docker logs ares-gui

Out of Memory

Increase Docker's memory allocation: - Docker Desktop: Settings → Resources → Memory - Recommended: At least 8GB

Permission Issues with Volumes

On Linux, you may need to adjust permissions:

chmod -R 755 results/ example_configs/ assets/

GUI Not Loading

  1. Check if container is running: bash docker ps

  2. Check logs: bash docker logs ares-gui

  3. Verify port mapping: bash docker port ares-gui

Building for Production

For production deployments, consider:

  1. Multi-stage build (smaller image size)
  2. Non-root user (better security)
  3. Health checks (monitoring)
  4. Environment variables (configuration)

Example production Dockerfile modifications:

# Add health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD curl -f http://localhost:8081/ || exit 1

# Run as non-root user
RUN useradd -m -u 1000 ares && chown -R ares:ares /app
USER ares

Security Considerations

  • The container runs as root by default (consider adding a non-root user for production)
  • Mounted volumes have host filesystem access
  • Network port 8081 is exposed
  • Consider using Docker secrets for sensitive configuration

Next Steps

Once the GUI is running:

  1. Upload a configuration file (📝 Configuration tab)
  2. Install required plugins (🔌 Plugins tab)
  3. Upload test data if needed (📊 Data tab)
  4. Run evaluations (🎯 Red Team tab)
  5. View results (📈 Reports tab)

For more information: - ARES Documentation - ARES GitHub Repository - Main README

Core symbols most depended-on inside this repo

load
called by 38
src/ares/builder.py
_preprocess_chat_template_with_responses
called by 19
src/ares/connectors/connector.py
generate
called by 19
plugins/ares-litellm/src/ares_litellm/__init__.py
_supports_chat_template
called by 18
src/ares/connectors/connector.py
fill_response_obj_with_success
called by 16
src/ares/connectors/connector.py
run
called by 16
plugins/ares-gcg/src/ares_gcg/goals/gcg_goals.py
build_connector
called by 15
src/ares/builder.py
generate
called by 15
plugins/ares-garak/src/ares_garak/strategies/encoding.py

Shape

Method 570
Function 523
Class 184
Route 8

Languages

Python100%

Modules by API surface

plugins/ares-cyberseceval/tests/evals/test_securitytools_eval.py32 symbols
src/ares/utils.py29 symbols
plugins/ares-mcp-connector/src/ares_mcp/connector/server.py28 symbols
plugins/ares-echo-chamber/src/ares_echo_chamber/strategies/echo_chamber.py26 symbols
src/ares/evals/multi_turn_eval.py24 symbols
plugins/ares-litellm/tests/test_litellm.py24 symbols
plugins/ares-litellm/src/ares_litellm/__init__.py24 symbols
plugins/ares-gcg/src/ares_gcg/strategies/gcg.py24 symbols
src/ares/connectors/huggingface.py22 symbols
plugins/ares-garak/tests/strategies/test_encoding_strategies.py21 symbols
plugins/ares-autodan/src/ares_autodan/strategies/opt_utils.py21 symbols
src/ares/visualization/response_visualizer.py20 symbols

For agents

$ claude mcp add ares \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact