Skip to content

Agent Mode

The agent component of Trailer.dev is responsible for managing container resources. It's available as a pre-built container:

bash
docker pull ghcr.io/trailer-dev/trailer:agent

Features

  • Container management
  • Resource allocation
  • Health monitoring
  • Environment setup
  • Command execution

Configuration

Environment Variables

bash
TRAILER_AGENT_TYPE=docker
TRAILER_AGENT_DOCKER_SOCKET=/var/run/docker.sock
TRAILER_AGENT_SERVER_URL=http://localhost:8090

Configuration File

yaml
agent:
  type: docker
  docker:
    socket: /var/run/docker.sock
  server_url: http://localhost:8090

Running the Agent

bash
docker run -d \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --gpus all \
  ghcr.io/trailer-dev/trailer:agent

Resource Management

  • Container lifecycle
  • Network configuration
  • Volume management
  • GPU allocation
  • Resource monitoring

Security

  • Socket permissions
  • Access control
  • Network isolation
  • Resource limits

Integration

The agent component integrates with:

  • Docker daemon
  • Kubernetes cluster
  • Server component
  • Resource monitoring

Released under the MIT License.