Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #26 from Microsoft/clantz/azure-ml-tweaks
Browse files Browse the repository at this point in the history
Update Azure ML Dockerfile based on reccomendations
  • Loading branch information
Chuxel authored Apr 30, 2019
2 parents da21e01 + 186a5b9 commit 0f86dc8
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,42 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM python:3
# Update this to FROM python:3 if you'd prefer
# to use standard python instead
FROM continuumio/anaconda3

# Install git, process tools
RUN apt-get update && apt-get -y install git procps
# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1

# Install Docker CE - ** COMMENT OUT IF YOU WILL ONLY RUN LOCAL OR IN AZURE **
RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - 2>/dev/null \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
# Copy default endpoint specific user settings overrides into container to
# to specify Python path and that Docker should run as a workspace extension
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json

# Install git, required tools
RUN apt-get install -y \
git \
curl \
procps \
apt-transport-https \
ca-certificates \
gnupg-agent \
software-properties-common \
sudo \
lsb-release 2>&1

# Install Docker CLI
RUN curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | (OUT=$(apt-key add - 2>&1) || echo $OUT) \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
&& apt-get update \
&& apt-get install -y docker-ce-cli

# Install pylint
RUN pip install pylint
# Install pylint and Azure ML SDK
RUN pip install pylint azureml-sdk[notebooks,automl] 2>&1

# Clean up
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"remote.extensionKind": {
"peterjausovec.vscode-docker": "workspace"
},
"python.pythonPath": "/opt/conda/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true
}
16 changes: 12 additions & 4 deletions containers/azure-machine-learning-python-3/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# Azure Machine Learning & Python 3
# Azure Machine Learning & Python 3 - Anaconda

## Summary

*Use Azure Machine Learning with Python 3. Includes Python, the Docker CLI (for local testing), and related extensions and dependencies.*
*Use Azure Machine Learning with Python 3 - Anaconda. Includes Anaconda, the Docker CLI (for local testing), and related extensions and dependencies.*

| Metadata | Value |
|----------|-------|
| *Contributors* | The VS Code Team |
| *Definition type* | Dockerfile |
| *Languages, platforms* | Azure Machine Learning, Python |
| *Languages, platforms* | Azure Machine Learning, Python, Anaconda |

## Using this definition with an existing folder

This definition requires an Azure subscription to use. You can create a [free account here](https://account.azure.com/signup?offer=ms-azr-0044p&appId=102&ref=azureplat-generic&redirectURL=https%3a%2f%2fazure.microsoft.com%2fen-us%2fget-started%2fwelcome-to-azure%2f&l=en-us&correlationId=15FE63BE1C4960F42D1B6EFB18496296) and learn more about using [Azure Machine Learning with VS Code here](https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-vscode-tools#get-started-with-azure-machine-learning). Once you have an Azure account, follow these steps:
There are a few notes for using this definition:

1. This definition requires an Azure subscription to use. You can create a [free account here](https://account.azure.com/signup?offer=ms-azr-0044p&appId=102&ref=azureplat-generic&redirectURL=https%3a%2f%2fazure.microsoft.com%2fen-us%2fget-started%2fwelcome-to-azure%2f&l=en-us&correlationId=15FE63BE1C4960F42D1B6EFB18496296) and learn more about using [Azure Machine Learning with VS Code here](https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-vscode-tools#get-started-with-azure-machine-learning).

2. The definition also uses an Anaconda base image which can take some time to download the first time given its size.

3. If you are using Docker locally in your `runconfig`, you will need to set `sharedVolumes` to `false` since these will not work from inside a dev container.

Once you have an Azure account, follow these steps:

1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.

Expand Down

0 comments on commit 0f86dc8

Please sign in to comment.