Deployment
Docker
Run MIGraphX and ROCm workloads inside containers with AMD GPU access.
ROCm containers need access to the AMD kernel devices. Without these devices, MIGraphX will not see the GPU target.
Interactive Container
docker run --rm -it \
--device=/dev/kfd \
--device=/dev/dri \
--group-add video \
--ipc=host \
--security-opt seccomp=unconfined \
rocm/dev-ubuntu-22.04:latestInside:
rocminfo | head
apt update
apt install -y migraphx migraphx-dev
migraphx-driver --helpMount Models
docker run --rm -it \
--device=/dev/kfd \
--device=/dev/dri \
--group-add video \
--ipc=host \
--security-opt seccomp=unconfined \
-v "$PWD/models:/models" \
rocm/dev-ubuntu-22.04:latest \
bashThen:
migraphx-driver compile /models/model.onnx --gpu --save /models/model.mxrDocker Compose
services:
migraphx:
image: rocm/dev-ubuntu-22.04:latest
devices:
- /dev/kfd
- /dev/dri
group_add:
- video
ipc: host
security_opt:
- seccomp=unconfined
volumes:
- ./models:/models
command: bashProduction Image Sketch
FROM rocm/dev-ubuntu-22.04:latest
RUN apt-get update && \
apt-get install -y --no-install-recommends migraphx migraphx-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY build/argus /app/argus
COPY models/model.mxr /app/models/model.mxr
ENTRYPOINT ["/app/argus"]Match the ROCm base image to the host driver support matrix used by your deployment environment.