{"id":497,"date":"2017-08-07T02:07:29","date_gmt":"2017-08-06T16:07:29","guid":{"rendered":"http:\/\/togaware.com\/?p=497"},"modified":"2021-03-05T16:57:06","modified_gmt":"2021-03-05T05:57:06","slug":"the-azure-linux-data-science-virtual-machine","status":"publish","type":"post","link":"https:\/\/togaware.com\/the-azure-linux-data-science-virtual-machine\/","title":{"rendered":"Open Source R on the Azure Ubuntu Data Science Virtual Machine"},"content":{"rendered":"

Data scientists rely on the freedom to innovate that is afforded by open source software. We often deploy an open source software stack based on Ubuntu GNU\/Linux <\/a>and the R Statistical Software.<\/a> This provides a powerful environment for the management, wrangling, analysis, modeling, and presentation of data within a tool that supports machine learning and artificial intelligence, including deep neural networks in R<\/a>.<\/p>\n

Whilst the open source software stack is also usually free of licensing fees we do still need to buy hardware on which to carry out our data science activities. Our own desktop and laptop computers will often suffice but as more data becomes available and our algorithms become more complex, having access to a Data Science Super Computer could be handy. The cloud offers cheap access to compute when you need it and the Azure Ubuntu Data Science Virtual Machine<\/a> (DSVM) has become a great platform for my data science when I need it. The Ubuntu DSVM comes pre-installed with an extensive suite of all of the open source software that I need as a data scientist (including Rattle<\/a> and RStudio<\/a>).<\/p>\n

<\/p>\n

A new data science virtual machine can be deployed with with a few clicks and some minimal information in less than 5 minutes. As our data and compute needs grow it can be resized to suit. Paying for just the compute as required (e.g., at 25 cents per hour) is an attractive proposition and powering down the server when not in use saves me considerably compared to having a departmental server running full time, irrespective of its workload. When not required we can deallocate the server to cost us nothing.\u00a0 There is no need for expensive high-specification hardware sitting on-premise waiting for the high demand loads when they are needed. Simply allocate and resize the virtual machine as and when needed and pay for the hardware you need when you need, not just in case you need it.<\/p>\n

The version of R provided with the Linux Data Science Virtual Machine is Microsoft’s R Server (closed source<\/strong>). This is based on the open source version of R but with added support for beyond RAM datasets of any size<\/em> with parallel<\/em> implementations of many of the machine learning algorithms for the data scientist. In the instructions below though please note that we replace Microsoft R Server as the default R with open source R. Both are then concurrently available on the server.<\/p>\n

I begin with a link to obtaining a free trial subscription (if you don’t already have an Azure subscription) and then continue to set up the Ubuntu DSVM using the Azure Portal and configuring the new server with various extra Linux packages (that are not yet on the DSVM by default – but stay tuned) as well as an updated version of open source R and Rattle. Note that the deployment and setup of the DSVM can also be completed from R running on our own laptops or desktops using our new AzureDSVM<\/a> R package. This then allows the process to be programmed.<\/p>\n

The following looks like a lot of steps, and maybe so, but each is simple and the whole process is really straight forward. If you disagree, please let me know and we’ll work on it.<\/p>\n

Obtain an Azure subscription<\/b><\/p>\n

    \n
  1. A free trial subscription is available from azure.com<\/a>. This is useful to get a feel for the capabilities of the Azure cloud and the costs involved. Costs apply only for the time the DSVM is deployed (irrespective of how much the CPU is utilised when it is deployed) so it is good practise to stop the server if you don’t need it for a period of time.<\/li>\n<\/ol>\n

    Create a Linux Data Science Virtual Machine<\/b><\/p>\n

      \n
    1. Log on to the Azure Portal<\/a>.<\/li>\n
    2. Click on + New<\/em>.<\/li>\n
    3. Search the Marketplace<\/em> for Linux Data Science Virtual Machine.<\/li>\n
    4. Select the Data Science Virtual Machine for Linux (Ubuntu)<\/em> from the search results.<\/li>\n
    5. Read the description to see if it matches your requirements and then click on Create<\/em>.<\/li>\n
    6. Setup the Basics<\/em>\n