# Docker Requirements

DRAGEN can be invoked from within a docker instance as long as the following conditions are met.

1. DRAGEN is installed in the container.
2. Installation requirements are met on the host.
3. Required docker runtime arguments are passed.

## Installation Requirements on the Host

| Platform | Requirement                                                                                                                                                |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Onprem   | Dragen must be installed on the host, and the version must be greater than or equal to the version in the container                                        |
| AWS      | dragen\_drv must be installed on the host, and its version must be greater than or equal to the version required by DRAGEN. In DRAGEN 4.4 that is 1.4.8.13 |
| Azure    | XRT and Xilinx packages must be installed on the host                                                                                                      |

## Docker Runtime Arguments

Docker runtime arguments are platform-specific.

| Argument                                | Onprem | AWS | Azure |
| --------------------------------------- | ------ | --- | ----- |
| `-v /dev/hugepages:/dev/hugepages:rw`   | yes    | no  | no    |
| `-v /dev/shm:/dev/shm:rw`               | yes    | yes | yes   |
| `-v /etc/localtime:/etc/localtime`      | yes    | no  | no    |
| `-v /var/lib/edico:/var/lib/edico:rw`   | yes    | no  | no    |
| `-v /var/log/dragen:/var/log/dragen:rw` | yes    | no  | no    |
| `-v /var/run/dragen:/var/run/dragen:rw` | yes    | no  | no    |
| `--device /dev/bus`                     | yes    | yes | no    |
| `--device /dev/dri`                     | no     | no  | yes   |
| `--pid host`                            | yes    | yes | yes   |
| `--ulimit nofile=720000:720000`         | yes    | yes | yes   |
| `--ulimit nproc=16384:16384`            | yes    | yes | yes   |
| `--ulimit memlock=4194304:4194304`      | yes    | no  | no    |

### Optional Docker Runtime Arguments

| Argument               | Description                                                                       |
| ---------------------- | --------------------------------------------------------------------------------- |
| `--cap-add SYS_PTRACE` | Allows DRAGEN to generate pstack files on failure, which helps with bug diagnosis |
| `-v /dev/log:/dev/log` | Redirects DRAGEN's syslog messages to the host's syslog daemon                    |
