Failed Image Creation: Unable to use Docker file to install ODBC driver
Migrating from Azure ML Experimentation. I added docker-file= argument to install MS SQL ODBC driver to the container. It worked fine on experimentation account but I got a 400 error stating Main file or dependency file failed to download.
Any idea how I can get the ODBC driver installed? Thanks!
Dockerfile:
# apt-get and system utilities
RUN apt-get update && apt-get install -y \
curl apt-utils apt-transport-https debconf-utils gcc build-essential g++-5\
&& rm -rf /var/lib/apt/lists/*
# adding custom MS repository
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
# install SQL Server drivers
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql unixodbc-dev
# install SQL Server tools
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y mssql-tools
RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
RUN /bin/bash -c "source ~/.bashrc"
# python libraries
RUN apt-get update && apt-get install -y \
python-pip python-dev python-setuptools \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# install necessary locales
RUN apt-get update && apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen
# install additional utilities
RUN apt-get update && apt-get install gettext nano vim -y
Azure Notebook Code:
# Create image
from azureml.core.webservice import Webservice
from azureml.core.image import ContainerImage
image_config = ContainerImage.image_configuration(execution_script = "score.py",
runtime = "python",
conda_file = "conda_dependencies.yml",
docker_file= "Dockerfile",
schema_file= "service_schema.json",
tags = {"product": "xxx", "type": "recommendation"})
image = ContainerImage.create(name = "xxx-image",
# this is the model object
models = "model.pkl",
image_config = image_config,
workspace = ws)
# Wait for the create process to complete
image.wait_for_creation(show_output = True)
Output:
Creating image
Running............
FailedImage creation operation finished for image mmm-main-image:6, operation "Failed"
Image creation failed with
StatusCode: 400
Message: Main file or dependency file failed to download, after multiple attempts
Thanks @screamyao for reporting this issue. A service fix to resolve this is being deployed.
Thanks @rastala. Is the fix still being deployed or already done? I'm still seeing the same issue right now.
this fix is being deployed right now. it will hit eastus2 regions first and propagate to the rest within a week.
this has been fixed so i am closing the issue.
I have the same issue:
Creating image Running.......... FailedImage creation operation finished for image imagedemo:2, operation "Failed" Image creation failed with StatusCode: 400 Message: Docker image build failed.