tree: af9895eaf3c89b4a934b062140ed56d3c6a042f8 [path history] [tgz]
  1. build_python_dockerfile.sh
  2. Dockerfile.mxnet.python.cpu
  3. Dockerfile.mxnet.python.cpu.mkl
  4. Dockerfile.mxnet.python.gpu.cu80
  5. Dockerfile.mxnet.python.gpu.cu80.mkl
  6. Dockerfile.mxnet.python.gpu.cu90
  7. Dockerfile.mxnet.python.gpu.cu90.mkl
  8. Dockerfile.mxnet.python.gpu.cu92
  9. Dockerfile.mxnet.python.gpu.cu92.mkl
  10. Dockerfile.mxnet.python3.cpu
  11. Dockerfile.mxnet.python3.cpu.mkl
  12. Dockerfile.mxnet.python3.gpu.cu80
  13. Dockerfile.mxnet.python3.gpu.cu80.mkl
  14. Dockerfile.mxnet.python3.gpu.cu90
  15. Dockerfile.mxnet.python3.gpu.cu90.mkl
  16. Dockerfile.mxnet.python3.gpu.cu92
  17. Dockerfile.mxnet.python3.gpu.cu92.mkl
  18. README.md
  19. test_mxnet.py
docker/docker-python/README.md

Release Python Docker Images for MXNet

The docker-python directory can be used to release mxnet python docker images to dockerhub after any mxnet release.
It uses the appropriate pip binaries to build different docker images. Both python2 (default) and python3 images are available as -

  • {version}_cpu
  • {version}_cpu_mkl
  • {version}_gpu_cu90
  • {version}_gpu_cu90_mkl
  • {version}_gpu_cu80
  • {version}_gpu_cu80_mkl
  • {version}_gpu_cu92
  • {version}_gpu_cu92_mkl
  • {version}_cpu_py3
  • {version}_cpu_mkl_py3
  • {version}_gpu_cu90_py3
  • {version}_gpu_cu90_mkl_py3
  • {version}_gpu_cu80_py3
  • {version}_gpu_cu80_mkl_py3
  • {version}_gpu_cu92_py3
  • {version}_gpu_cu92_mkl_py3

And the following tags will be available without the version string in the image name (for Benchmarking and other use cases):

  • latest (same as {version}_cpu)
  • gpu (same as {version}_gpu_cu90)
  • latest_cpu_mkl_py2 (same as {version}_cpu_mkl)
  • latest_cpu_mkl_py3 (same as {version}_cpu_mkl_py3)
  • latest_gpu_mkl_py2 (same as {version}_gpu_cu90_mkl)
  • latest_gpu_mkl_py3 (same as {version}_gpu_cu90_mkl_py3)

Refer: https://pypi.org/project/mxnet/

Using the Build Script

./build_python_dockerfile.sh <mxnet_version> <pip_tag> <path_to_cloned_mxnet_repo>

For example: ./build_python_dockerfile.sh 1.3.0 1.3.0.post0 ~/build-docker/incubator-mxnet

Tests run

  • test_conv.py
  • train_mnist.py
  • test_mxnet.py: This script is used to make sure that the docker image builds the expected mxnet version. That is, the version picked by pip is the same as as the version passed as a parameter.

Dockerhub Credentials

Dockerhub credentials will be required to push images at the end of this script. Credentials can be provided in the following ways:

  • Interactive Login: Run the script as is and it will ask you for credentials interactively.
  • Be Already Logged in: Login to the mxnet dockerhub account before you run the build script and the script will complete build, test and push.
  • Set Environment Variables: Set the following environment variables which the script will pick up to login to dockerhub at runtime -
    • $MXNET_DOCKERHUB_PASSWORD
    • $MXNET_DOCKERHUB_USERNAME

Using the Docker Images

  • The MXNet Python Docker images can be found here: https://hub.docker.com/r/mxnet/python/

  • Docker Pull Command: docker pull mxnet/python:<image_tag>

  • Get started: docker run -it mxnet/python:<image_tag> bash