Guest User

Untitled

a guest
Jan 23rd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. ================================================
  2. Installing Python and IPython on Microsoft Azure
  3. ================================================
  4.  
  5. Introduction
  6. ============
  7.  
  8. Azure is Microsoft's cloud computing platform. Azure integrates with the Windows HPC Server 2008 R2 SP2 job
  9. scheduler. This allows you to use the Windows HPC job scheduler to schedule jobs on computing nodes running
  10. in Azure. This guide describes the steps needed to install Python and IPython on Azure compute nodes.
  11.  
  12. The guide assumes the following:
  13.  
  14. * A Windows HPC Server 2008 R2 SP2 head node has been configured.
  15. * Azure compute nodes have been started and joined to the head node.
  16. * The Azure compute nodes to be used have been joined to a node group called "ipython".
  17. * You can use Remote Desktop Connection to log onto the Azure compute nodes.
  18.  
  19. Installation
  20. ============
  21.  
  22. We now describe the steps needed to install the following packages on the Azure compute nodes:
  23.  
  24. * Python
  25. * Distribute
  26. * IPython
  27. * PyZMQ
  28.  
  29. This same procedure could be used to install other packages as well.
  30.  
  31. Upload the packages to the compute nodes using Azure storage
  32. ------------------------------------------------------------
  33.  
  34. The simplest way of installing the above packages is to simply use Remote Desktop Connection to log
  35. onto the compute nodes, download the packages and install them. However, to save time, we will use
  36. `hpcpack` command to upload the packages to the compute nodes in one shot.
  37.  
  38. 1. Download the Python 2.7 Windows installer and `distribute_setup.py` and put them in a local directory
  39. named "python27".
  40. 2. Create an Azure package by doing::
  41.  
  42. hpcpack create python27.zip .\python27
  43.  
  44. 3. Upload the package to Azure storage by doing::
  45.  
  46. hpcpack upload python27.zip /nodetemplate:"Default AzureNode Template" \relativepath:python27
  47.  
  48. 4. Sync the package to the Azure compute nodes::
  49.  
  50. clusrun /nodegroup:ipython hpcsync
  51.  
  52. At this point, the python27 directory should be present on all the compute nodes. This can be tested
  53. by doing::
  54.  
  55. clusrun /nodegroup:ipython dir %CCP_PACKAGE_ROOT%python27
  56.  
  57. Installation using `clusrun`
  58. ----------------------------
  59.  
  60. With the packages uploaded to the compute nodes, we can now use `clusrun` to install them.
  61.  
  62. 1. Install Python::
  63.  
  64. clusrun /nodegroup:ipython msiexec /i %CCP_PACKAGE_ROOT%python27\python-2.7.2.msi /qn
  65.  
  66. 2. Install Distribute
  67.  
  68. clusrun /nodegroup:ipython D:\Python27\python.exe %CCP_PACKAGE_ROOT%python27\distribute_setup.py
  69.  
  70. 3. Install PyZMQ
  71.  
  72. clusrun /nodegroup:ipython D:\Python27\Scripts\easy_install.exe pyzmq
  73.  
  74. 4. Install IPython
  75.  
  76. clusrun /nodegroup:ipython D:\Python27\Scripts\easy_install.exe ipython
  77.  
  78. At this point, Python, PyZMQ and IPython have been installed on the Azure compute nodes. The
  79. best way of confirming that the installation was successful is to log on to the nodes using
  80. Remote Desktop Connection and try running IPython::
  81.  
  82. D:\Python27\Scripts\ipython.exe
  83.  
  84. Manual installation
  85. -------------------
  86.  
  87. There is one problem that came up in installing things using `clusrun`. We were unable to get
  88. NumPy installed in the same manner. It appears that when Python is installed using `clusrun`,
  89. the registry is not properly updated, so NumPy does not see that Python is installed and will
  90. refuse to run.
  91.  
  92. If you need NumPy to be installed, we found that simply logging onto the Azure compute nodes
  93. using Remote Desktop Connection and performing the installation by hand worked fine.
Add Comment
Please, Sign In to add comment