\u4e4b\u540e\uff1a<\/strong><\/span><\/div>\naz login<\/pre>\n\u63a5\u4e0b\u6765\u6211\u4eec\u65b0\u5efa\u4e00\u4e2a\u8d44\u6e90\u7ec4\u7528\u4f5c\u7ba1\u7406\uff0c\u8d44\u6e90\u7ec4\u9009\u62e9EastUS\u3002<\/p>\n
az group create -n tensorflow -l EastUS<\/pre>\n\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4e00\u4e2aSSH\u5bc6\u94a5\u5bf9\uff0c\u8fd9\u4e2a\u6211\u4eec\u5f85\u4f1a\u518d\u8bf4\u3002<\/p>\n
\u63a5\u4e0b\u6765\u6211\u4eec\u65b0\u5efa\u4e00\u4e2a\u865a\u62df\u673a\uff0c\u9009\u62e9\u5de6\u8fb9\u7684\u4fa7\u680f\uff1a<\/strong><\/span><\/div>\n
\n
\n\u9009\u62e9ubuntu 16.04 LTS\u5373\u53ef\uff0c\u4e4b\u540e\u6309\u7167\u81ea\u5df1\u9700\u8981\u7684\u8fdb\u884c\u5b9a\u5236\u3002
\n\u5728\u7b2c\u4e00\u6b65\u7684\u65f6\u5019\u53ef\u80fd\u9700\u8981\u4f60\u9009\u62e9\u7528\u6237\u540d\u6216\u8005SSH\uff0c\u6b64\u65f6\u5efa\u8bae\u5148\u4f7f\u7528\u7528\u6237\u540d\uff0c\u4e4b\u540e\u518d\u7981\u7528\u3002<\/p>\n
\u4e00\u5207\u90fd\u914d\u7f6e\u5b8c\u6210\u4e4b\u540e,\u542f\u52a8\u865a\u62df\u673a\uff1a<\/strong><\/span><\/div>\naz vm start -g tensorflow -n tensorflow<\/pre>\n\u4f7f\u7528\u7528\u6237\u540d\u5bc6\u7801\u767b\u9646\u3002<\/p>\n
\u63a5\u4e0b\u6765\u6211\u4eec\u5b89\u88c5CUDA8 + CuDNN 5.1. TensorFlow\u5b98\u65b9\u5c1a\u672a\u652f\u6301CUDA9\uff0c\u6240\u4ee5\u6211\u4eec\u6682\u65f6\u4f7f\u7528CUDA8.<\/strong><\/span><\/div>\nwget https:\/\/developer.nvidia.com\/compute\/cuda\/8.0\/prod\/local_installers\/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb\r\nsudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb\r\nsudo apt-get update\r\nsudo apt-get install -y cuda\r\nrm cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb<\/pre>\n\u4e4b\u540e\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<\/p>\n
nvidia-smi<\/pre>\n \u67e5\u770bGPU\u72b6\u6001<\/p>\n
\u4e0b\u4e00\u6b65\u5b89\u88c5CuDNN 5.1.<\/strong><\/span><\/div>\nwget http:\/\/developer.download.nvidia.com\/compute\/redist\/cudnn\/v5.1\/cudnn-8.0-linux-x64-v5.1.tgz\r\nsudo tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C \/usr\/local\r\nrm cudnn-8.0-linux-x64-v5.1.tgz\r\nsudo ldconfig<\/pre>\n\u6700\u540e\u6dfb\u52a0\u8fdb\u73af\u5883\u53d8\u91cf\uff1a<\/strong><\/span><\/div>\nexport CUDA_HOME=\/usr\/local\/cuda-8.0\r\nexport PATH=${CUDA_HOME}\/bin:${PATH}\r\nexport LD_LIBRARY_PATH=${CUDA_HOME}\/lib64:\/usr\/local\/cuda\/lib64:${LD_LIBRARY_PATH}<\/pre>\n\u56e0\u4e3a\u6211\u559c\u6b22\u7528python3\uff0c\u6240\u4ee5\u6211\u8981\u53e6\u5916\u88c5\u4e0aPython3\u548c\u5bf9\u5e94\u7684pip\u3002<\/p>\n
sudo apt-get install python3-setuptools\r\nsudo easy_install3 pip<\/pre>\n\u8fd9\u6837\uff0c\u4f60\u8f93\u5165Python3\uff0cpip3\u4f1a\u542f\u52a8Python3\uff0c\u800c\u8f93\u5165python\uff0cpip\u4f1a\u542f\u52a8Python2.<\/p>\n
\u4e4b\u540e\u5b89\u88c5TensorFlow r1.2\uff08\u56e0\u4e3a1.3\u7248\u672c\u9700\u8981CuDNN 6+\uff09<\/strong><\/span><\/div>\nsudo apt-get install -y python3-dev\r\nsudo pip install tensorflow-gpu==1.2<\/pre>\nTensorFlow\u7684\u5b89\u88c5\u5b8c\u6210\u3002\u8f93\u5165\u4e0b\u5217\u8bed\u53e5\u8fdb\u884c\u6d4b\u8bd5\uff1a<\/strong><\/span><\/div>\n >>> import tensorflow as tf\r\n>>> session = tf.Session()<\/pre>\n\u5f53\u7136\uff0c\u4f60\u53ef\u4ee5\u968f\u65f6\u79bb\u5f00\u865a\u62df\u673a\uff1a<\/strong><\/span><\/div>\naz vm deallocate -g tensorflow -n tensorflow<\/pre>\n","protected":false},"excerpt":{"rendered":"\u4e4b\u540e\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684Terminal\uff0c\u9009\u62e9Bash\uff0c\u8fdb\u884c\u6700\u521d\u7684\u51c6\u5907\u3002\u6b64\u65f6\u5c06\u4f1a\u5206\u914d\u4e00\u4e2a\u65b0\u7684\u5b58\u50a8\u7a7a\u95f4\u7ed9\u4f60\u4f7f\u7528\u3002 sud […]<\/p>\n","protected":false},"author":1893,"featured_media":164307,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-164302","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/164302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1893"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=164302"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/164302\/revisions"}],"predecessor-version":[{"id":164308,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/164302\/revisions\/164308"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/164307"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=164302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=164302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=164302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}