MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

How to copy files into docker image while deploying ml model using azure ml model deploy command

Open Kannadasan89 opened this issue 5 years ago • 1 comments

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"
    }
}}

Kannadasan89 avatar Jun 13 '21 13:06 Kannadasan89

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

salilbapat avatar Jul 20 '21 16:07 salilbapat