A comprehensive Docker-based development environment specifically designed for AI agent development, equipped with GPU acceleration, security tools, code quality assurance, and a rich set of development utilities.
Once you build and run this container, you get a complete AI development environment with:
Container: wAgents/
āāā š /app/ # Main application directory (mounted from host)
ā āāā š python/examples/ # Example code for testing tools
ā ā āāā š security/ # Security vulnerability examples
ā ā ā āāā š test_code_scan.py # Code with security vulnerabilities
ā ā ā āāā š test_library_scan.py # Dependencies with known CVEs
ā ā āāā š quality/ # Code quality issue examples
ā ā ā āāā š test_quality_check.py # Code with quality issues
ā ā āāā š yolo/ # YOLO AI/ML examples
ā ā ā āāā š person detection detection.v2i.yolov11/ # Person detection dataset
ā ā ā ā āāā š train/ # Training images & labels
ā ā ā ā āāā š valid/ # Validation images & labels
ā ā ā ā āāā š test/ # Test images & labels
ā ā ā ā āāā š data.yaml # Dataset configuration
ā ā ā āāā š train_yolo.py # YOLO training example
ā ā ā āāā š validate_yolo.py # YOLO validation example
ā ā ā āāā š test_yolo.py # YOLO testing example
ā ā ā āāā š inference_yolo.py # YOLO inference example
ā ā āāā š other/ # General development examples
ā ā āāā š test_other_tools.py # Code with style issues
ā āāā š requirements/ # Python dependencies
ā ā āāā š base.txt # Core development tools
ā ā āāā š dvc.txt # Data version control
ā ā āāā š security.txt # Security scanning tools
ā ā āāā š yolo.txt # AI/ML object detection tools
ā ā āāā š see_image_terminal.txt # Terminal image viewing
ā āāā š scripts/ # Automation scripts
ā ā āāā š executor/ # Runtime execution scripts
ā ā ā āāā š security/ # Security scanning scripts
ā ā ā ā āāā š scan_code_vulnerability.sh
ā ā ā ā āāā š scan_libraries_vulnerability.sh
ā ā ā āāā š quality/ # Code quality scripts
ā ā ā ā āāā š correct_quality_py.sh
ā ā ā āāā š images/ # Image viewing scripts
ā ā ā ā āāā š see_image_with_clickimage.py
ā ā ā ā āāā š see_imagen_with_sixel.py
ā ā ā āāā š other/ # Utility scripts
ā ā ā ā āāā š new_curl.sh
ā ā ā āāā š auto_reload_py.sh # Auto-reload Python apps
ā ā āāā š install/ # Installation and setup scripts
ā ā āāā š dvc_controller.sh # DVC setup
ā ā āāā š images_control.sh # Image management
ā ā āāā š other_agents.sh # AI agents installation
ā āāā š Dockerfile # Container definition
ā āāā š docker-compose.yml # Service orchestration
ā āāā š README.md # Host documentation
ā āāā š William-1.jpg # Sample image
āāā š /requirements/ # Container requirements (build-time copy)
āāā š /scripts/ # Container scripts (build-time copy)
āāā š /python_test/ # Test Python files (build-time copy)
āāā š /root/ # Home directory with Zsh config
When you enter the container, you get:
# You are here: /root (home directory)
# Shell: Zsh with Oh My Zsh
# Prompt: Customized with git status
# Aliases: 20+ productivity shortcuts
Key Aliases Available:
# Navigation
ls # Enhanced listing with icons (exa)
ll # Detailed listing (exa -l --icons)
la # All files with details (exa -la --icons)
cd myproject # Smart directory jumping (zoxide)
tree # Interactive directory tree (broot)
# Search & Find
grep pattern . # Fast search with ripgrep
find filename # Fast file finding (fd)
# System Monitoring
du # Better disk usage (dust)
df # Better disk free (duf)
ps # Better process listing (procs)
top # Better system monitor (btop)
# Development
cat file # Cat with syntax highlighting (batcat)
nano file # Microsoft Edit editor
help # Shows welcome banner
All Python tools are pre-installed and ready:
# Security tools
bandit --version # Security linter
safety --version # Dependency scanner
scapy # Packet manipulation
# Quality tools
ruff --version # Fast linter/formatter
pre-commit --version # Git hooks
# Data tools
dvc --version # Data version control
pandas --version # Data manipulation
boto3 --version # AWS SDK
# AI/ML tools
ultralytics --version # YOLO object detection
python -c "import torch" # PyTorch framework
python -c "import cv2" # OpenCV computer vision
# Development tools
ipython # Enhanced Python REPL
nvitop # GPU process monitoring
watchdog # File system monitoring
| Container Path | Purpose | What You'll Find |
|---|---|---|
/app | Main application directory | Your project files (mounted from host) |
/scripts | Build-time scripts copy | Scripts copied during build |
/scripts/executor/security/ | Security tools | Vulnerability scanning scripts |
/scripts/executor/quality/ | Quality tools | Code quality scripts |
/python_test | Test Python files copy | Python examples copied during build |
/python_test/examples/ | Test examples | Code with intentional issues |
/python_test/examples/yolo/ | YOLO examples | AI/ML object detection examples |
/requirements | Requirements copy | Requirements files copied during build |
/requirements/yolo.txt | YOLO dependencies | AI/ML object detection tools |
/root/.zshrc | Shell configuration | Aliases, plugins, settings |
/root/.oh-my-zsh/ | Zsh framework | Plugins and themes |
# 1. Enter the container
docker-compose exec agent zsh
# 2. You'll see the welcome banner automatically
# 3. Navigate to your project
cd /app
# 4. See what's available
help # Shows all tools and scripts
ls # See project structure
# Navigate to security examples (using build-time copy)
cd /python_test/examples/security
# Run security scan on vulnerable code
/scripts/executor/security/scan_code_vulnerability.sh
# Expected output:
# >> Issue: [B608:hardcoded_sql_expressions]
# >> Severity: Medium Confidence: High
# >> Location: test_code_scan.py:6
# >> More Info: https://bandit.readthedocs.io/en/latest/
# Run dependency vulnerability scan
/scripts/executor/security/scan_libraries_vulnerability.sh
# Expected output:
# >> WARNING: requests==2.25.0 has known vulnerabilities
# >> WARNING: urllib3==1.26.0 has known vulnerabilities
# Navigate to quality examples (using build-time copy)
cd /python_test/examples/quality
# Run quality check and auto-fix
/scripts/executor/quality/correct_quality_py.sh
# Expected output:
# >> test_quality_check.py:6:1: E501 Line too long (85 > 88)
# >> test_quality_check.py:9:1: F841 Unused variable 'unused_var'
# >> Fixed 2 issues
# Install YOLO dependencies
pip install -r /requirements/yolo.txt
# Navigate to YOLO examples
cd /python_test/examples/yolo
# Test YOLO training on person detection dataset
python train_yolo.py
# Test YOLO validation on trained model
python validate_yolo.py
# Test YOLO testing and benchmarking
python test_yolo.py
# Test YOLO inference (single image from dataset)
python inference_yolo.py --image "/python_test/examples/yolo/person detection detection.v2i.yolov11/test/images/ektp30_jpeg.rf.d8df759f943f1b0edf4bf8829ff61533.jpg"
# Test YOLO inference (batch on dataset samples)
python inference_yolo.py --samples 10
# Test YOLO real-time inference
python inference_yolo.py --camera 0
# Dataset info:
# - Dataset: Person Detection v2 (YOLOv11 format)
# - Classes: ['Face'] (1 class)
# - Train/Val/Test split available
# - Real images with person annotations
# Navigate to your project
cd /app
# Start auto-reload development server
/scripts/executor/auto_reload_py.sh
# In another terminal, view images
/scripts/executor/images/see_imagen_with_sixel.py /app/scripts/William-1.jpg
# Use productivity tools
rg "import" /python_test/examples/ # Fast search
exa --tree /python_test/examples/ # Tree view
btop # System monitor
| Tool | Command | Purpose | Example Usage |
|---|---|---|---|
| Bandit | bandit -r . | Python security linter | bandit -r /python_test/examples/ |
| Safety | safety check | Dependency vulnerability scanner | safety check -r requirements.txt |
| Scapy | python -c "import scapy" | Packet manipulation | scapy.all.IP().show() |
| Py-spy | py-spy top --pid <pid> | Python profiler | py-spy top -- python app.py |
| Tool | Command | Purpose | Example Usage |
|---|---|---|---|
| Ruff | ruff check --fix . | Fast linter/formatter | ruff check --fix /python_test/examples/ |
| Pre-commit | pre-commit run --all-files | Git hooks | pre-commit run --all-files |
| Black | ruff format . | Code formatter | ruff format /python_test/examples/ |
| Tool | Command | Purpose | Example Usage |
|---|---|---|---|
| DVC | dvc init | Data version control | dvc init --no-scm |
| IPython | ipython | Enhanced REPL | ipython --matplotlib |
| NVitop | nvitop | GPU monitoring | nvitop |
| Watchdog | watchmedo | File monitoring | watchmedo auto-restart . |
| Tool | Alias | Purpose | Example Usage |
|---|---|---|---|
| Exa | ls, ll, la | Modern ls | ll --git |
| Ripgrep | grep | Fast search | grep "TODO" /python_test/ |
| Fd | find | Fast find | find "*.py" /python_test/ |
| Broot | tree | Interactive tree | tree /python_test/ |
| Dust | du | Disk usage | du /python_test/ |
| Duf | df | Disk free | df -h |
| Procs | ps | Process list | ps python |
| Btop | top | System monitor | btop |
graph LR
A[Host Files] --> B[COPY requirements]
B --> C[requirements]
A --> D[COPY scripts]
D --> E[scripts]
A --> F[COPY python]
F --> G[python_test]
C --> H[Install Python Packages]
E --> I[Configure Scripts]
G --> J[Setup Examples]
H --> K[Install AI/ML Tools]
I --> K
J --> K
K --> L[Final Container]
subgraph "AI/ML Components"
M[Ultralytics YOLO]
N[PyTorch]
O[OpenCV]
P[Person Detection Dataset]
end
H --> M
H --> N
H --> O
J --> P
graph TB
A[Container Start] --> B[WORKDIR app]
B --> C[Mount Host Volume]
C --> D[Zsh Shell Ready]
D --> E[Tools Available]
E --> F[Scripts at scripts]
E --> G[Examples at python_test]
E --> H[Project at app]
E --> I[AI/ML Environment]
F --> J[Welcome Script]
G --> J
H --> J
I --> J
J --> K[Ready for Development]
subgraph "AI/ML Runtime"
L[Person Detection Dataset]
M[GPU Acceleration]
N[Model Training]
O[Real-time Inference]
end
I --> L
I --> M
I --> N
I --> O
# Check GPU inside container
nvidia-smi
# Expected output: GPU information table
# If error: Check NVIDIA runtime installation
docker run --rm --gpus all wisrovi/agents:gpu-slim nvidia-smi
# Fix permissions inside container
chmod +x /scripts/executor/security/*.sh
chmod +x /scripts/executor/quality/*.sh
chmod +x /scripts/install/*.sh
# Or run with bash explicitly
bash /scripts/executor/security/scan_code_vulnerability.sh
# Check installed packages
pip list | grep -E "(bandit|safety|ruff|dvc)"
# Reinstall if needed
pip install -r /requirements/security.txt
pip install -r /requirements/base.txt
# Reload shell configuration
source /root/.zshrc
# Or restart container
docker-compose restart agent
# Check container status
docker-compose ps
# Access container with full shell
docker-compose exec agent zsh
# Check environment variables
env | grep -E "(PATH|PYTHON|CUDA|HOME)"
# Check mounted volumes
mount | grep /app
# Check running processes
ps aux | grep -E "(python|zsh)"
# Check disk usage
df -h
du -sh /python_test
# Monitor GPU usage
nvitop
# Monitor system resources
btop
# Monitor Python processes
py-spy top --pid $(pgrep -f python)
# Check network connectivity
ping google.com
curl -I https://github.com
# Create custom workspace
mkdir -p /app/workspace/my_project
cd /app/workspace/my_project
# Initialize git
git init
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
# Set up pre-commit hooks
pre-commit install
# Initialize DVC for data management
dvc init
dvc remote add -d myremote s3://my-bucket/data
# Run security scans on all Python files
find /python_test -name "*.py" -exec bandit {} \;
# Run quality checks with output to file
ruff check /python_test/examples/ > quality_report.txt
# Run dependency checks on all requirements
find /requirements -name "*.txt" -exec safety check -r {} \;
# Add custom aliases (temporary)
echo "alias mytool='python /scripts/mytool.py'" >> /root/.zshrc
source /root/.zshrc
# Install additional Python packages
pip install jupyterlab matplotlib seaborn
# Install system packages
apt-get update && apt-get install -y htop tree
Built with ā¤ļø for the AI Agent development community
This guide focuses on what you'll find inside the container once it's built and running.
alias wisrovi="docker run --rm --hostname wAgent --init -i -t --shm-size 16g --cpus 6.0 --memory 16g --gpus all --log-opt max-size=50m -e TZ=Europe/Madrid -v "$(pwd)":/app -v /var/run/docker.sock:/var/run/docker.sock -v ~/.ssh:/root/.ssh:ro wisrovi/agents:gpu-slim zsh"
docker run \
--rm \
--hostname wAgent \
--init \
-i -t \
--shm-size 16g \
--cpus 6.0 \
--memory 16g \
--gpus all \
--log-opt max-size=50m \
-e TZ=Europe/Madrid \
-v "$(pwd)":/app \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.ssh:/root/.ssh:ro \
wisrovi/agents:gpu-slim \
zsh
docker run -d \
--name wisrovi-agent-gpu \
--hostname wAgent \
--restart unless-stopped \
--init \
-i -t \
--shm-size 16g \
--cpus 6.0 \
--memory 16g \
--gpus all \
--log-opt max-size=50m \
-e TZ=Europe/Madrid \
-v "$(pwd)":/app \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.ssh:/root/.ssh:ro \
wisrovi/agents:gpu-slim
services:
agents:
image: wisrovi/agents:gpu-slim
volumes:
- ./:/app
- /var/run/docker.sock:/var/run/docker.sock
- ~/.ssh:/root/.ssh:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
limits:
cpus: '6.0'
memory: 16g
stdin_open: true
tty: true
shm_size: 16g
hostname: wAgent
restart: unless-stopped
init: true
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "5"
Content type
Image
Digest
sha256:dae788bddā¦
Size
868.1 MB
Last updated
3 months ago
docker pull wisrovi/agents:gpu