Updated on 2024-06-21 GMT+08:00

Step 1 Preparing a Docker Server and Configuring an Environment

Prepare a server with Docker enabled. If no such a server is available, create an ECS, buy an EIP, and install required software on it. Subsequent image building, debugging, and registration are all performed on this server.

ModelArts provides Ubuntu scripts for you to install Docker easier.

The operations on the local Linux server are the same as those on the ECS. For details, see this case.

Creating an ECS

  • Log in to the ECS console and click Buy ECS. Select a public image (an Ubuntu 18.04 image is recommended) and set the system disk to 100 GiB. For more details, see Purchasing and Logging In to a Linux ECS.
    Figure 1 Selecting an image and a disk
  • Purchase an EIP and bind it to the ECS. For details, see Configure Network.

Configuring an ECS

  1. Run the following command on the Docker ECS to download the installation script:
    wget https://cnnorth4-modelarts-sdk.obs.cn-north-4.myhuaweicloud.com/modelarts/custom-image-build/install_on_ubuntu1804.sh

    Only Ubuntu scripts are supported.

  2. Run the following command on the Docker ECS to configure the environment:
    bash install_on_ubuntu1804.sh
    Figure 2 Configured
    source /etc/profile

    The installation script is executed to:

    1. Install Docker.
    2. If the Docker ECS runs on GPUs, install nvidia-docker2 to mount the GPUs to the Docker container.