Skip to content

HSA Docker Containers: Downloading and Running HSA on Docker

James Edwards edited this page Feb 26, 2015 · 2 revisions

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. The HSA project has created HSA specific Docker containers and made them available in public Docker repositories. These containers provide pre-configured and easy to use test and development environments for HSA.

Installing Docker support

Please consult the official Docker documentation for Docker installation and configuration. Note: The documentation presented on this page assumes the user has Docker version 1.2 or greater.

Obtaining the Docker Images

Currently there are two available HSA containers in the Docker public repositories:

  • jedwards/ubuntu-hsa-v1.0 - Contains the runtime libraries required to run HSA applications.
  • jedwards/ubuntu-hsa-v1.0-dev - Contains development libraries, header files and tools required to develop and run HSA applications.

To obtain either of these images, log into the Docker public repository and execute the commands:

sudo docker search jedwards/ubuntu-hsa-v1.0

sudo docker search jedwards/ubuntu-hsa-v1.0-dev

If the images are available, use the 'docker pull' command to pull them to local repositories:

sudo docker pull jedwards/ubuntu-hsa-v1.0

sudo docker pull jedwards/ubuntu-hsa-v1.0-dev

Running a HSA Docker container

To run an HSA Docker container you must have a compatible HSA driver set installed on the host where you will start the Docker image and a properly configured /dev/kfd device. Start either of the images with the following commands:

sudo docker run --device /dev/kfd -i -t jedwards/ubuntu-hsa-v1.0 /bin/bash

sudo docker run --device /dev/kfd -i -t jedwards/ubuntu-hsa-v1.0-dev /bin/bash

This will start a Docker container and place the user in a bash shell that has access to the pre-configured HSA software components. The '--device /dev/kfd' option exposes the HSA device to the docker container. You can also use the --privileged to get access to all system devices (the --privileged option is also supported on older docker versions).

Previous versions of HSA Docker containers

The v0.9 version of the HSA runtime is still available in the following docker containers:

  • jedwards/ubuntu-hsa-v0.9
  • jedwards/ubuntu-hsa-v0.9-dev