{"id":7036,"date":"2019-10-24T14:11:30","date_gmt":"2019-10-24T18:11:30","guid":{"rendered":"https:\/\/carleton.ca\/scs\/?page_id=7036"},"modified":"2023-04-20T14:24:17","modified_gmt":"2023-04-20T18:24:17","slug":"gpu-image-cuda-10-1-tensorflow","status":"publish","type":"page","link":"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/","title":{"rendered":"DEPRECATED &#8211; GPU Image CUDA 10.1 Tensorflow (2019)"},"content":{"rendered":"<h3>Image Name<\/h3>\n<p>scs-gpu-cuda10.1-tensorflow<\/p>\n<h3>Creation Date<\/h3>\n<p>Oct. 31, 2019<\/p>\n<h3>Operating System<\/h3>\n<p><strong>O\/S<\/strong>: Ubuntu 18.04<\/p>\n<p><strong>Window Manager<\/strong>: XFCE<\/p>\n<h3>Intended Use<\/h3>\n<p>GPU virtual machine with tensorflow install.<\/p>\n<p>This VM has been tested with the GeForce RTX 2080 SUPER card that requires NVIDIA driver greater than 418 compatible with CUDA 10.1.<\/p>\n<blockquote><p>This Virtual machine has been depricated and replaced by <a href=\"https:\/\/carleton.ca\/scs\/tech-support\/gpu\/scs-tensorflow-gpu-vm-2021\/\" target=\"_blank\" rel=\"noopener noreferrer\">SCS Tensorflow GPU VM 2021<\/a><\/p><\/blockquote>\n<h3>Account<\/h3>\n<p><em>Username:Password<\/em><\/p>\n<p>student:student<\/p>\n<h3>Access<\/h3>\n<p>From outside of Carleton you will need to VPN to Carleton in order to access the VM<\/p>\n<ul>\n<li><strong>VPN<\/strong>: <a href=\"https:\/\/carleton.ca\/its\/help-centre\/remote-access\/\" target=\"_blank\" rel=\"noopener noreferrer\">Carleton VPN<\/a> when connecting from outside of the campus<\/li>\n<li><strong>x2go<\/strong>: download <a href=\"https:\/\/wiki.x2go.org\/doku.php\/download:start\" target=\"_blank\" rel=\"noopener noreferrer\">x2go client<\/a> to get a\u00a0 full graphical desktop<\/li>\n<li><strong>ssh<\/strong>: use a terminal window to gain ssh access<\/li>\n<li><strong>console<\/strong>: <a href=\"https:\/\/openstack.scs.carleton.ca\" target=\"_blank\" rel=\"noopener noreferrer\">SCS Open Stack horizon<\/a> web interface (not recommended)<\/li>\n<\/ul>\n<blockquote><p>For the x2go config use <strong>Session Type:<\/strong> XFCE<\/p><\/blockquote>\n<p><\/p>\n<h3>Software<\/h3>\n<div class=\"table-wrapper\">\n<table style=\"width: 30.9438%; height: 203px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 51.25%;\"><strong>Software<\/strong><\/td>\n<td style=\"width: 46.5625%;\"><strong>Version<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 51.25%;\">NVIDIA Driver<\/td>\n<td style=\"width: 46.5625%;\">430.50<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 51.25%;\">CUDA Toolkit<\/td>\n<td style=\"width: 46.5625%;\">10.1<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 51.25%;\">cuDNN<\/td>\n<td style=\"width: 46.5625%;\">7.6.4<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 51.25%;\">NCCL<\/td>\n<td style=\"width: 46.5625%;\">2.4.8<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 51.25%;\">Tensorflow<\/td>\n<td style=\"width: 46.5625%;\">1.15 or 2.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><\/p>\n<h3>Tensorflow<\/h3>\n<p>The image has Tensorflow 1.15 installed by default. Tensorflow 2.0 is available as a pip whl package.<\/p>\n<p>The tensorflow build packages are located here:<\/p>\n<p><code>\/home\/student\/tensorflow<\/code><\/p>\n<p>There are two tensorflow version files:<\/p>\n<p><code>tensorflow-1.15.0-cp27-cp27mu-linux_x86_64.whl<br \/>\ntensorflow-2.0.0-cp27-cp27mu-linux_x86_64.whl<\/code><\/p>\n<p>The pip install command is:<\/p>\n<p><code>pip install --upgrade --user \/home\/student\/tensorflow\/tensorflow-1.15.0-cp27-cp27mu-linux_x86_64.whl<\/code><\/p>\n<p>Check your tensorflow version as follows:<\/p>\n<p><code>python -c 'import tensorflow as tf; print(tf.__version__)'<\/code><\/p>\n<p>Test if the GPU is available:<\/p>\n<p><code>python \/home\/student\/tensorflow\/is_gpu_available.py<\/code><\/p>\n<h3>Switching Tensorflow versions<\/h3>\n<p>One way to switch tensorflow versions you can remove the old tensorflow install for the user. Say you want to install tensorflow 2.0 then you can do the following (assuming the student user):<\/p>\n<pre>rm -rf \/home\/student\/.local\r\nrm -rf \/home\/student\/.cache\r\npip install -U --user six numpy wheel mock\r\npip install -U --user keras_applications==1.0.6 --no-deps\r\npip install -U --user keras_preprocessing==1.0.5 --no-deps\r\npip install -U --user tensorflow_datasets\r\npip install -U --user \/home\/student\/tensorflow\/tensorflow-2.0.0-cp27-cp27mu-linux_x86_64.whl<\/pre>\n<p>Then try running a tensorflow 2.0 example:<\/p>\n<pre>python \/home\/student\/tensorflow\/tensorFlow2example.py\r\npython \/home\/student\/tensorflow\/tensorFlow2example2.py<\/pre>\n<p><\/p>\n<h3>Testing the GPU<\/h3>\n<blockquote><p>There is a danger that you run your program and the server is not using the GPU! Monitor the GPU and check its utilization to verify your program is really using the GPU.<\/p><\/blockquote>\n<p>This test case is a 2 step procedure:<\/p>\n<ol>\n<li>Run your test code<\/li>\n<li>Monitor the GPU<\/li>\n<\/ol>\n<p>Open to shell windows on your instance. In one shell window run:<\/p>\n<p><code>nvidia-smi -l<\/code><\/p>\n<p>that will monitor the GPU.<\/p>\n<p>The other window you can launch the pre-installed test code in the student account:<\/p>\n<p><code>python \/home\/student\/benchmarks-master\/scripts\/tf_cnn_benchmarks\/tf_cnn_benchmarks.py --num_gpus=1 --batch_size=32 --model=resnet50 --variable_update=parameter_server<\/code><\/p>\n<p><\/p>\n<p><a href=\"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-7059 alignnone\" src=\"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi.jpg\" alt=\"\" width=\"770\" height=\"564\" srcset=\"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi.jpg 770w, https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi-160x117.jpg 160w, https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi-240x176.jpg 240w, https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi-768x563.jpg 768w, https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi-400x293.jpg 400w, https:\/\/carleton.ca\/scs\/wp-content\/uploads\/nvidia-smi-360x264.jpg 360w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/a><\/p>\n<p>Verify that your program is being sent to the GPU and verify the GPU-Util is using the GPU, ideally at 100% utilization. In the above case its using 97% GPU-utlization<\/p>\n<p>You can deviceQuery the GPU for information, its a good test if the GPU is detected on it gives you details of its spec&#8217;s. This is one of the CUDA samples:<\/p>\n<p><\/p>\n<p><code>\/home\/student\/NVIDIA_CUDA-10.1_Samples\/1_Utilities\/deviceQuery\/deviceQuery<\/code><\/p>\n<p>The result should look something like this:<\/p>\n<p><code>CUDA Device Query (Runtime API) version (CUDART static linking)<\/code><\/p>\n<p>Detected 1 CUDA Capable device(s)<\/p>\n<p>Device 0: &#8220;GeForce RTX 2080 SUPER&#8221;<br \/>\nCUDA Driver Version \/ Runtime Version 10.1 \/ 10.1<br \/>\nCUDA Capability Major\/Minor version number: 7.5<br \/>\nTotal amount of global memory: 7982 MBytes (8370061312 bytes)<br \/>\n(48) Multiprocessors, ( 64) CUDA Cores\/MP: 3072 CUDA Cores<br \/>\nGPU Max Clock rate: 1815 MHz (1.81 GHz)<br \/>\nMemory Clock rate: 7751 Mhz<br \/>\nMemory Bus Width: 256-bit<br \/>\nL2 Cache Size: 4194304 bytes<br \/>\nMaximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)<br \/>\nMaximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers<br \/>\nMaximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers<br \/>\nTotal amount of constant memory: 65536 bytes<br \/>\nTotal amount of shared memory per block: 49152 bytes<br \/>\nTotal number of registers available per block: 65536<br \/>\nWarp size: 32<br \/>\nMaximum number of threads per multiprocessor: 1024<br \/>\nMaximum number of threads per block: 1024<br \/>\nMax dimension size of a thread block (x,y,z): (1024, 1024, 64)<br \/>\nMax dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)<br \/>\nMaximum memory pitch: 2147483647 bytes<br \/>\nTexture alignment: 512 bytes<br \/>\nConcurrent copy and kernel execution: Yes with 3 copy engine(s)<br \/>\nRun time limit on kernels: No<br \/>\nIntegrated GPU sharing Host Memory: No<br \/>\nSupport host page-locked memory mapping: Yes<br \/>\nAlignment requirement for Surfaces: Yes<br \/>\nDevice has ECC support: Disabled<br \/>\nDevice supports Unified Addressing (UVA): Yes<br \/>\nDevice supports Compute Preemption: Yes<br \/>\nSupports Cooperative Kernel Launch: Yes<br \/>\nSupports MultiDevice Co-op Kernel Launch: Yes<br \/>\nDevice PCI Domain ID \/ Bus ID \/ location ID: 0 \/ 0 \/ 5<br \/>\nCompute Mode:<br \/>\n&lt; Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) &gt;<\/p>\n<p>deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.1, CUDA Runtime Version = 10.1, NumDevs = 1<br \/>\nResult = PASS<\/p>\n<p><\/p>\n<p><\/p>\n<p><\/p>\n<p><\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Image Name scs-gpu-cuda10.1-tensorflow Creation Date Oct. 31, 2019 Operating System O\/S: Ubuntu 18.04 Window Manager: XFCE Intended Use GPU virtual machine with tensorflow install. This VM has been tested with the GeForce RTX 2080 SUPER card that requires NVIDIA driver greater than 418 compatible with CUDA 10.1. This Virtual machine has been depricated and replaced [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":6535,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DEPRECATED - GPU Image CUDA 10.1 Tensorflow (2019) - School of Computer Science<\/title>\n<meta name=\"description\" content=\"Image Name scs-gpu-cuda10.1-tensorflow Creation Date Oct. 31, 2019 Operating System O\/S: Ubuntu 18.04 Window Manager: XFCE Intended Use GPU virtual\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/\",\"url\":\"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/\",\"name\":\"DEPRECATED - GPU Image CUDA 10.1 Tensorflow (2019) - School of Computer Science\",\"isPartOf\":{\"@id\":\"https:\/\/carleton.ca\/scs\/#website\"},\"datePublished\":\"2019-10-24T18:11:30+00:00\",\"dateModified\":\"2023-04-20T18:24:17+00:00\",\"description\":\"Image Name scs-gpu-cuda10.1-tensorflow Creation Date Oct. 31, 2019 Operating System O\/S: Ubuntu 18.04 Window Manager: XFCE Intended Use GPU virtual\",\"breadcrumb\":{\"@id\":\"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/carleton.ca\/scs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Technical Support\",\"item\":\"https:\/\/carleton.ca\/scs\/tech-support\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"DEPRECATED &#8211; GPU Image CUDA 10.1 Tensorflow (2019)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/carleton.ca\/scs\/#website\",\"url\":\"https:\/\/carleton.ca\/scs\/\",\"name\":\"School of Computer Science\",\"description\":\"Carleton University\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/carleton.ca\/scs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DEPRECATED - GPU Image CUDA 10.1 Tensorflow (2019) - School of Computer Science","description":"Image Name scs-gpu-cuda10.1-tensorflow Creation Date Oct. 31, 2019 Operating System O\/S: Ubuntu 18.04 Window Manager: XFCE Intended Use GPU virtual","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/","url":"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/","name":"DEPRECATED - GPU Image CUDA 10.1 Tensorflow (2019) - School of Computer Science","isPartOf":{"@id":"https:\/\/carleton.ca\/scs\/#website"},"datePublished":"2019-10-24T18:11:30+00:00","dateModified":"2023-04-20T18:24:17+00:00","description":"Image Name scs-gpu-cuda10.1-tensorflow Creation Date Oct. 31, 2019 Operating System O\/S: Ubuntu 18.04 Window Manager: XFCE Intended Use GPU virtual","breadcrumb":{"@id":"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/carleton.ca\/scs\/"},{"@type":"ListItem","position":2,"name":"Technical Support","item":"https:\/\/carleton.ca\/scs\/tech-support\/"},{"@type":"ListItem","position":3,"name":"DEPRECATED &#8211; GPU Image CUDA 10.1 Tensorflow (2019)"}]},{"@type":"WebSite","@id":"https:\/\/carleton.ca\/scs\/#website","url":"https:\/\/carleton.ca\/scs\/","name":"School of Computer Science","description":"Carleton University","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/carleton.ca\/scs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"acf":{"banner_image_type":"upload","banner_button":"no","banner_uploaded_image":{"ID":7090,"id":7090,"title":"Three GPU's","filename":"three-gpus.jpg","filesize":275796,"url":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus.jpg","link":"https:\/\/carleton.ca\/scs\/tech-support\/gpu-image-cuda-10-1-tensorflow\/three-gpus\/","alt":"Three GPU's","author":"7","description":"Three GPU's","caption":"","name":"three-gpus","status":"inherit","uploaded_to":7036,"date":"2019-10-31 19:14:37","modified":"2022-01-05 14:54:57","menu_order":0,"mime_type":"image\/jpeg","type":"image","subtype":"jpeg","icon":"https:\/\/carleton.ca\/scs\/wp\/wp-includes\/images\/media\/default.png","width":1600,"height":700,"sizes":{"thumbnail":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-160x70.jpg","thumbnail-width":160,"thumbnail-height":70,"medium":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-240x105.jpg","medium-width":240,"medium-height":105,"medium_large":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-768x336.jpg","medium_large-width":768,"medium_large-height":336,"large":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-400x175.jpg","large-width":400,"large-height":175,"gallery-thumb":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-300x230.jpg","gallery-thumb-width":300,"gallery-thumb-height":230,"1536x1536":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus.jpg","1536x1536-width":1536,"1536x1536-height":672,"2048x2048":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus.jpg","2048x2048-width":1600,"2048x2048-height":700,"banner":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus.jpg","banner-width":1600,"banner-height":700,"people":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-200x200.jpg","people-width":200,"people-height":200,"post-thumb":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-300x230.jpg","post-thumb-width":300,"post-thumb-height":230,"rotator-image":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-800x600.jpg","rotator-image-width":800,"rotator-image-height":600,"video-thumb":"https:\/\/carleton.ca\/scs\/wp-content\/uploads\/three-gpus-360x158.jpg","video-thumb-width":360,"video-thumb-height":158}},"banner_opacity":"dark"},"_links":{"self":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/pages\/7036"}],"collection":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/comments?post=7036"}],"version-history":[{"count":4,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/pages\/7036\/revisions"}],"predecessor-version":[{"id":16705,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/pages\/7036\/revisions\/16705"}],"up":[{"embeddable":true,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/pages\/6535"}],"wp:attachment":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/media?parent=7036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}