Artificial Intelligence on IaaS++
From the Microsoft Cloud and AI Team
This workshop leads you through a series of Jupyter Notebooks that explain how to use the Microsoft Azure Data Science Virtual Machine (DSVM) and the Team Data Science Process (TDSP) to create Data Science and AI solutions. These solutions can be deployed in a variety of ways, leveraging Infrastructure-as-a-Service (IaaS) through Platform-as-a-Service (PaaS) environments, and a mixture of both based on requirements.
The material for this workshop is intended for a Data Scientist familiar with Machine Learning, Python programming, Artificial Intelligence application development, and a professional backgound in team software development with methodologies such as Agile. If any of these topics are new to you, we have a learning path here that you can follow to bring you up to speed before you start this workshop.
This material draws from a previous example, which draws from yet another example.
Prepare The Project - System Setup and Configuration
The following labs will guide you through setting up an account, a DSVM, and the Azure Machine Learning workspaces and other elements needed to create your solution. You’ll also download the Project Plan for your solution for your team.
In Phase One of this Workshop, you’ll learn more about how to discover the questions that need an answer, information about the data sources you require, a determination of the algorithms and other parts of an experiment, creating a trained model, operationalizing the solution so that a customer can access it, and how to close out the project with the customer along with any model retraining that is needed. Before you begin these phases, you’ll need to set up your environment to perform each of these steps.
Lab 0.0 - Set up an Microsoft Azure Account
For experimentation and model management, we’ll use the Microsoft Azure platform. There are four choices for setting up a Microsoft Azure account:
- You can use a Free Subscription - The process for setting that up is here
- You can use a Microsoft Developer Network (MSDN) account - The process for setting that up is here
- You can use a Corporate account - See your corporate person in charge of Azure accounts to see if you are able to create a Virtual Machine and other assets on your company subscription
- If you are taking this workshop in an on-premises training class, your trainer may provide an Azure Account login for you - Ask your training instructor for instructions for a login
Once you have an Azure account login, open the Microsoft Azure Portal and continue to the next lab.
Lab 0.1 - Set up the Azure Deep Learning Virtual Machine
- Open this page and perform the steps to set up a Linux Deep Learning DSVM, with a Password.
- Follow the instructions for that section, choosing NC6 Standard as the size of the DSVM
- Complete the creation of the DSVM, and note the name, connection information and password for your system.
(Note: You do not need to configure an X2Go client unless you want to - it is not required for the course)
Lab 0.2 - Log in to the DSVM, Explore and Update the System
Whenever you install a new system, it’s a good idea to check the environment to ascertain it’s configuration. In Linux, the following commands are useful:
- On your local system, open CMD on Windows or a Terminal Window on Linux.
- Type the following commands:
ssh <Login Name You Created>@<IP Address of your DSVM>
First, start with the release information of the Operating System:
And let’s check the drive space:
We notice that the home mount point (/data) doesn’t have a lot of room. We’ll fix that in a bit.
Finally, let’s update the system:
sudo apt-get update
(You may be prompted for the password you set in the Portal when you created the VM)
sudo apt-get upgrade
Next, you’ll want to enable Docker to be configured for use by non-root users. You can learn more about that process here: https://docs.microsoft.com/en-us/azure/machine-learning/desktop-workbench/deployment-setup-configuration
Run the following commands to set that up:
pip install -r https://aka.ms/az-ml-o16n-cli-requirements-file
Now log out of the DSVM and login via SSH again.
Commands complete successfully.
Lab 0.3 - Clone the Workshop’s Jupyter Notebooks
- We’ll need more space for the labs, since /data doesn’t have enough to do what we need to do. Log in to the DSVM, and clone the course with the following command:
sudo mkdir /gpuclass
- Then grant access to it for everyone (Security Note: in production, you would limit the access to only certain groups, and determine for each file whether they need read/write/execute):
sudo chmod -R 0777 /gpuclass
- Now clone the course with the following command:
git clone https://github.com/Azure/LearnAI-AIonIaaS /gpuclass
- And link to it with the following command:
ln -s /gpuclass ~/notebooks/gpuclass
We should now be able to see the course materials when we access the notebook server.
Enter the following commands to ensure you have several Notebook files:
Lab 0.4 - Start the Jupyter Notebook Server and Open the Workshop Notebooks
- You’re now ready to continue on to the introduction Jupyter Notebook. Connect to it on your local brwoser using the following URL, replacing the IP Address with the IP Address (or DNS name) of your Linux DSVM, which you can find in the Azure Portal:
https://<IP Address of your DSVM>:8000
You may get a security warning, since your DSVM is not set up with a signed certificate, but as long as you verify you are connecting to your DSVM’s address, you may continue to your site.
NOTE: Continuing to a system that is not yours by bypassing the browser’s security warning is highly dangerous, and you should exit that screen immediately if the IP address is not correct. Carefully verify that you are accessing the correct site!
- If prompted, log in with the name and password you set for your Linux DSVM
- If prompted, click the
Start My Serverbutton.
- Navigate to the
~/notebooks/gpuclass/notebooksfolder and open the
0 - Introduction.ipynbJupyter Notebook. Continue the workshop from there.