Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed Image Creation: Unable to use Docker file to install ODBC driver #35

Closed
screamyao opened this issue Oct 2, 2018 · 5 comments
Closed

Comments

@screamyao
Copy link

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
@screamyao screamyao changed the title Dockerfile install ODBC driver failed Failed Image Creation: Unable to use Docker file to install ODBC driver Oct 2, 2018
@rastala
Copy link
Member

rastala commented Oct 2, 2018

Thanks @screamyao for reporting this issue. A service fix to resolve this is being deployed.

@screamyao
Copy link
Author

Thanks @rastala. Is the fix still being deployed or already done? I'm still seeing the same issue right now.

@hning86
Copy link
Contributor

hning86 commented Oct 6, 2018

this fix is being deployed right now. it will hit eastus2 regions first and propagate to the rest within a week.

@hning86
Copy link
Contributor

hning86 commented Oct 23, 2018

this has been fixed so i am closing the issue.

@hning86 hning86 closed this as completed Oct 23, 2018
@mnozary
Copy link

mnozary commented May 2, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants