MachineLearningNotebooks
MachineLearningNotebooks copied to clipboard
How to copy files into docker image while deploying ml model using azure ml model deploy command
I am trying to deploy ml model using az ml model deploy command with additional files.
Eg:-
az ml model deploy --ds docker-additional-steps.txt
docker-additional-steps.txt
COPY *.txt /var/azureml-app/
but it gives an error as below
Failed
ERROR: {'Azure-cli-ml Version': '1.29.0', 'Error': WebserviceException:
Message: Image creation polling reached non-successful terminal state, current state: Failed
Error response from server:
StatusCode: 400
Message: Failed to parse steps: COPY is not an allowed Dockerfile instruction. Allowed instructions: ARG, ENV, EXPOSE, LABEL, RUN
InnerException None
ErrorResponse
{
"error": {
"message": "Image creation polling reached non-successful terminal state, current state: Failed\nError response from server:\nStatusCode: 400\nMessage: Failed to parse steps: COPY is not an allowed Dockerfile instruction. Allowed instructions: ARG, ENV, EXPOSE, LABEL, RUN"
}
}}
Extra docker steps is no longer supported. Please create an environment instead where you can inject files as you wish and use that environment for deployment. Here is a sample.
https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/deploy-to-cloud/model-register-and-deploy.ipynb