Skip to content

Running Docker Containers as Jobs

You can execute Docker images in Predictive Learning (PrL), just as you can any model stored in PrL.

About Docker Images

Please read through the following important points about pushing Docker images to MindSphere or when executing them:

  • Do not store access data such as usernames, tokens, and secrets within Docker images, even though the storage location itself is secure.
  • The Docker containers you create have limited external connectivity; for example, they can only download Python or R libraries; therefore, you should include in the Docker image all the extra data and libraries they require.
  • When using Docker containers remember the PrL gateway can only be accessed from within MindSphere, and not directly from your local environment; you can, however, access MindSphere from your local environment, then open PrL.
  • Exposing ports from your Docker container has no effect because they run in isolation and other components cannot access them.

Additional Code Required in Dockerfiles

Depending on the type of input your container requires, the Dockerfile used in building the container requires a few extra lines of code to allow the environment to prepare input data, and to extract outputs.

For Data Exchange or Data Lake Input

The Dockerfile for Data Exchange or Data Lake input requires the following:

RUN ["mkdir", "/data"]

RUN ["mkdir", "/data/input"]

RUN ["mkdir", "/data/output"]

RUN chmod 777 -R /data

For IoT Input

The Dockerfile for IoT input requires the following:

RUN ["mkdir", "/iot_data"]

RUN ["mkdir", "/iot_data/input"]

RUN ["mkdir", "/iot_data/output"]

RUN ["mkdir", "/iot_data/datasets"]

RUN chmod 777 -R /iot_data

For PrL Storage Inputs or Outputs

The Dockerfile for PrL storage inputs and outputs requires the following:

RUN ["mkdir", "/prl_storage_data"]

RUN chmod 777 -R /prl_storage_data

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.


Last update: April 1, 2022