Customization of base images

Warning

This requires knowledge of Docker concepts and skills in creating custom Dockerfiles

When building the base image with

./bin/dssadmin build-container-exec-base-image

it creates a base image with:

  • Python 2.7 and Python 3.6
  • R
  • No CUDA support

Adding CUDA support

To build a CUDA-enabled base image, add -c 1 to the command line

# -c 1 enables cuda
# -t TAG sets the generated image tag

./bin/dssadmin build-container-exec-base-image -c 1

Note

  • This image contains CUDA 9.0 and CuDNN 7.0
  • You can also build it as a separate base image (see below)

Multiple base images

If you don’t use the “-t” flag, DSS builds a base image with this naming scheme:

dku-exec-base-DSS_INSTALL_ID : dss-DSS_VERSION

Where

  • DSS_INSTALL_ID is the identifier of the DSS installation, found in the install.ini file
  • DSS_VERSION is the version of DSS

If you don’t specify anything in the “base image” field of the DSS container execution configuration, this tag will automatically be used.

You can build other base images by appending the “-t IMAGE_NAME:IMAGE_VERSION” flag to the ./bin/dssadmin build-container-exec-base-image command.

Adding system packages

There are cases where you will want to install additional system packages, generally because they are required by your code environment.

DSS does not automatically provide support for this, so the generic mechanism is:

  • Build a base image with the regular DSS mechanisms
  • Write a custom Dockerfile that starts from the built base image and add the required package
  • Build this custom Dockerfile, and output a custom tag
  • Enter this custom tag in the DSS Container execution configuration

Warning

After each upgrade of DSS, you must rebuild all base images, including custom ones