Invalid Runtime Dependency Configured in an Imported Custom Image
Symptom
When a custom image is imported through an API to create an AI application, the runtime dependency is configured, but the pip dependency package is not properly installed.
Possible Causes
An imported custom image does not support the runtime dependency. The system does not automatically install the required pip dependency package.
Solution
Create a custom image again.
Install the pip dependency package (for example, the Flask dependency package) in the Dockerfile file that is used to create the image.
# Configure the Huawei Cloud source and install Python, Python3-PIP, and Flask. RUN cp -a /etc/apt/sources.list /etc/apt/sources.list.bak && \ sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.comxxx@g" /etc/apt/sources.list && \ sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.comxxx@g" /etc/apt/sources.list && \ apt-get update && \ apt-get install -y python3 python3-pip && \ pip3 install --trusted-host https://repo.huaweicloud.comxxx -i https://repo.huaweicloud.comxxx/repository/pypi/simple Flask
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot