ROCm-docker/docker-compose.yml.template
Kent Knox 3a10ee9adb Adding docker-compose functionality (#6)
* Adding docker-compose

Adding docker-compose configuration file to define how containers
should be linked and what data to share.
Adding setenv files to the hcc containers

* New templating engine to generate dockerfiles on disk

Changing roc-setup script to generate dockerfiles, so
images are built with build contexts.  Now, roc-setup only
generates dockerfiles, and leverages the docker-compose utility to
build images and compose the shared volumes

* Adding thunk and runtime to docker compose file

Building the thunk and runtime components with docker
compose.  Refactoring of various template files.

* Further docker-compose development

Added lots of little features and refactorings
1.  Eliminated remove-image and dry-run options from roc-setup as
redundant
2.  Templated the install location of volumes
3.  Rewrote the README file
4.  Fixes to the install procedure for ROCT

* Extracting binary hsa libraries, adding kfd device passthrough

HSAIL generated binaries need libraries available in the ROCR debian
package to properly function.
The docker-compose yaml file now passes /dev/kfd access through to the
container
Various cleanup of docker template files

* docker-compose.yml.template fix

The image names for the example rocm-project services were the
same
2016-04-07 12:33:30 -05:00

83 lines
1.8 KiB
Plaintext

version: '2'
services:
# The following defines data-only containers
# They are not meant to be used as interactive containers
roct:
build:
context: ./roct
dockerfile: Dockerfile
image: ${roct_name}
container_name: roct
entrypoint: /bin/true
volumes:
- ${roct_volume}
rocr:
depends_on:
- roct
build:
context: ./rocr
dockerfile: Dockerfile
image: ${rocr_name}
container_name: rocr
entrypoint: /bin/true
volumes:
- ${rocr_volume}
hcc-isa:
depends_on:
- rocr
build:
context: ./hcc-isa
dockerfile: Dockerfile
image: ${hcc_isa_name}
container_name: hcc-isa
entrypoint: /bin/true
volumes:
- ${hcc_volume}
hcc-hsail:
depends_on:
- rocr
build:
context: ./hcc-hsail
dockerfile: Dockerfile
image: ${hcc_hsail_name}
container_name: hcc-hsail
entrypoint: /bin/true
volumes:
- ${hcc_volume}
# The following defines application containers, which depend on the data-only
# containers defiend above to provide their software layers
# These should be run with `docker-compose run --rm <application-service>`
rocm-project-isa:
build:
context: ./rocm-project
dockerfile: Dockerfile
devices:
- "/dev/kfd"
image: rocm/rocm-project-isa
# volumes is used to map host directories into the container
volumes:
- ~:/usr/local/src/host-home
volumes_from:
- roct:ro
- rocr:ro
- hcc-isa:ro
rocm-project-hsail:
build:
context: ./rocm-project
dockerfile: Dockerfile
devices:
- "/dev/kfd"
image: rocm/rocm-project-hsail
# volumes is used to map host directories into the container
volumes:
- ~:/usr/local/src/host-home
volumes_from:
- roct:ro
- rocr:ro
- hcc-hsail:ro