How Can I Upload Images to SWR?

This section describes how to upload images to SWR.

Step 1 Logging In to SWR

  1. Log in to the SWR console.

  2. Click Create Organization in the upper right corner and enter an organization name to create an organization. You can customize an organization name. In this case, deep-learning is used as an example. The organization name deep-learning used in subsequent commands must be replaced with the actual organization name.

  3. Click Generate Login Command in the upper right corner to obtain a login command.

    **Figure 1** Login Command

    Figure 1 Login Command

  4. Log in to the ECS environment as the root user and enter the login command.

    **Figure 2** Login command executed on the ECS

    Figure 2 Login command executed on the ECS

Step 2 Uploading Images to SWR

This section describes how to upload an image to SWR.

  1. Log in to SWR and tag the image to be uploaded. Replace the organization name deep-learning in subsequent commands with the actual organization name configured in step 1.

    sudo docker tag tf-1.13.2:latest swr.xxx.com/deep-learning/tf-1.13.2:latest
    
  2. Run the following command to upload the image:

    sudo docker push swr.xxx.com/deep-learning/tf-1.13.2:latest
    
    **Figure 3** Uploading an image

    Figure 3 Uploading an image

  3. After the image is uploaded, choose My Images on the left navigation pane of the SWR console to view the uploaded custom images.

    swr.xxx.com/deep-learning/tf-1.13.2:latest is the SWR URL of the custom image.