In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "how to build a virtual machine on Azure". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to build a virtual machine on Azure" can help you solve your doubts.
Azure is equivalent to a large cloud operating system. Azure not only provides infrastructure services such as virtual machines, hard disks, but also hosting services. You can host your own website on it and then you can visit it.
Build a virtual machine on Azure
First, let's open Azure.
Then click Terminal in the upper right corner and select Bash for initial preparation. A new storage space will be allocated to you at this time.
Enter:
Sudo pip install azure-cli
After that:
Az login
Next, we create a new resource group for management, and the resource group selects EastUS.
Az group create-n tensorflow-l EastUS
We may need a SSH key pair at this time, which we will talk about later.
Next, let's create a new virtual machine and select the left sidebar:
Select ubuntu 16.04LTS, and then customize it according to your needs. You may need to choose a user name or SSH in the first step. It is recommended to use a user name before disabling it.
After everything is configured, start the virtual machine:
Az vm start-g tensorflow-n tensorflow
Log in with a username and password.
Next, let's install CUDA8 + CuDNN 5.1. TensorFlow officially does not support CUDA9, so we use CUDA8.
Wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-debsudo dpkg-I cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-debsudo apt-get updatesudo apt-get install-y cudarm cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
And then we can use
Nvidia-smi
View GPU status
The next step is to install CuDNN 5.1.
Wget http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgzsudo tar-xzf cudnn-8.0-linux-x64-v5.1.tgz-C / usr/localrm cudnn-8.0-linux-x64-v5.1.tgzsudo ldconfig
Finally, add the environment variable:
Export CUDA_HOME=/usr/local/cuda-8.0export PATH=$ {CUDA_HOME} / bin:$ {PATH} export LD_LIBRARY_PATH=$ {CUDA_HOME} / lib64:/usr/local/cuda/lib64:$ {LD_LIBRARY_PATH}
Because I like to use python3, I want to install Python3 and corresponding pip separately.
Sudo apt-get install python3-setuptoolssudo easy_install3 pip
In this way, typing Python3,pip3 will start Python3, and typing python,pip will start Python2.
Install TensorFlow r1.2 after that (because version 1.3 requires CuDNN 6 +)
Sudo apt-get install-y python3-devsudo pip install tensorflow-gpu==1.2
The installation of TensorFlow is complete. Enter the following statement to test:
> import tensorflow as tf > session = tf.Session ()
Of course, you can leave the virtual machine at any time:
Az vm deallocate-g tensorflow-n tensorflow has read this article "how to build a virtual machine on Azure". If you want to grasp the knowledge of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.