Help Center/ ModelArts/ Troubleshooting/ DevEnviron/ Save an Image Failures/ Failed to Create a Custom Image Using ma-cli and an Error Is Displayed Indicating that the File Does Not Exist
Updated on 2024-12-30 GMT+08:00

Failed to Create a Custom Image Using ma-cli and an Error Is Displayed Indicating that the File Does Not Exist

Symptom

A user fails to create a custom image using ma-cli, and an error message is displayed, indicating that the file directory does not exist.

Figure 1 Error message "xxx not found"

Possible Causes

The copied file must be placed at the same folder level as the Dockerfile or in the subdirectory.

Figure 2 Incorrect file path

Solution

  1. Check the file path in the COPY command of the Dockerfile. Place the file to be copied in the same-level directory as the Dockerfile or in the subdirectory. As shown in the following figure, the Dockerfile is in the ./.ma/customize_from_ubuntu_18.04_to_modelarts/ directory. Place the file to be copied in /home/ma-user/work/.ma/customize_from_ubuntu_18.04_to_modelarts.
    Figure 3 Obtaining the Dockerfile path
  1. Change the Dockerfile command to a relative path. The following is an example:
    COPY ./mindspore-2.1.0-cp39-cp39-linux_aarch64.whl /tmp/mindspore-2.1.0-cp39-cp39 -linux_aarch64.whl