Skip to main content

AI Red Teaming Tool and Framework

Project description

How to Install dtx

Before you begin, choose how you want to run dtx depending on your environment and requirements.


Option 1: Install dtx locally with full dependencies (torch etc.)

This is recommended if you plan to run local models (e.g., Hugging Face, Ollama) on your machine.

pip install dtx[torch]

Includes:

  • Core CLI
  • torch, transformers for local LLM and classifier execution
  • Supports all datasets and local execution

Option 2: Install dtx if torch is already installed

If your environment already has torch installed (for example, in a GPU-accelerated ML environment), you can skip extras:

pip install dtx

dtx will use your existing torch installation.

Tip: Verify torch is installed:

python -c "import torch; print(torch.__version__)"

Option 3: Use uv for fast installation in a clean environment

If you're creating a new environment and want fast dependency resolution with uv:

Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh

Install dtx with full dependencies

uv pip install dtx[torch]

Option 4: Use Docker wrapper (ddtx)

If you prefer Dockerized execution (no local torch install required), you can use ddtx.

  1. Install dtx (for the ddtx wrapper CLI):
pip install dtx
  1. Use ddtx to run inside Docker:
ddtx redteam scope "Describe your agent" output.yml

Features:

  • No need to install torch locally
  • Fully containerized execution
  • Automatically mounts .env and working directories
  • Use Docker-managed templates and tools

Summary of Options

Method Use case Install command
Local, full dependencies Full feature set, local models pip install dtx[torch]
Local, existing torch You already have torch installed pip install dtx
New env, fast install Clean, fast setup uv pip install dtx[torch]
Docker (ddtx) No local Python dependencies, isolated pip install dtx + use ddtx CLI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dtx-0.15.0.tar.gz (639.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dtx-0.15.0-py3-none-any.whl (730.0 kB view details)

Uploaded Python 3

File details

Details for the file dtx-0.15.0.tar.gz.

File metadata

  • Download URL: dtx-0.15.0.tar.gz
  • Upload date:
  • Size: 639.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.8 Linux/6.8.0-1021-azure

File hashes

Hashes for dtx-0.15.0.tar.gz
Algorithm Hash digest
SHA256 283900bfe2fcad1ad1c68f9e1e74a71c9b7d8103bb86cc0136b14390788ce01b
MD5 ad566ea21bb1b9a4039230611f4c59e4
BLAKE2b-256 7d06129d5c7bbad7622761c78a54339d21dc5601bd3398f4c9789c832a133ce7

See more details on using hashes here.

File details

Details for the file dtx-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: dtx-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 730.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.8 Linux/6.8.0-1021-azure

File hashes

Hashes for dtx-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92794ace2a126b9486ed323a8ef1c427fa14f2155371e3e9873ae7e22a76f1c5
MD5 ed4ba85ced33efa14699b69e6d7f9732
BLAKE2b-256 88df3d6864102293c974f8e739ad799ad07596527b9bcb104df89bca5bb470a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page