{"id":19283678,"url":"https://github.com/dkarunakaran/tensorflow-gpu-ubuntu-18-04","last_synced_at":"2026-05-18T14:03:56.785Z","repository":{"id":125317923,"uuid":"146291738","full_name":"dkarunakaran/tensorflow-gpu-ubuntu-18-04","owner":"dkarunakaran","description":"Tensorflow-gpu installation","archived":false,"fork":false,"pushed_at":"2018-08-27T12:27:54.000Z","size":266,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T22:41:32.066Z","etag":null,"topics":["cuda9","cudnn-v7","deep-learning","machine-learning","python3","tensorflow","tensorflow-gpu","ubuntu1804"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkarunakaran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-27T12:03:18.000Z","updated_at":"2018-08-27T12:36:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9461530-7068-4283-a972-532786bae4ac","html_url":"https://github.com/dkarunakaran/tensorflow-gpu-ubuntu-18-04","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dkarunakaran/tensorflow-gpu-ubuntu-18-04","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkarunakaran%2Ftensorflow-gpu-ubuntu-18-04","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkarunakaran%2Ftensorflow-gpu-ubuntu-18-04/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkarunakaran%2Ftensorflow-gpu-ubuntu-18-04/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkarunakaran%2Ftensorflow-gpu-ubuntu-18-04/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkarunakaran","download_url":"https://codeload.github.com/dkarunakaran/tensorflow-gpu-ubuntu-18-04/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkarunakaran%2Ftensorflow-gpu-ubuntu-18-04/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33180310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda9","cudnn-v7","deep-learning","machine-learning","python3","tensorflow","tensorflow-gpu","ubuntu1804"],"created_at":"2024-11-09T21:34:31.351Z","updated_at":"2026-05-18T14:03:56.769Z","avatar_url":"https://github.com/dkarunakaran.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tensorflow-gpu on Ubuntu 18.04\n\u003cimg src='images/tf.jpeg'/\u003e\nI wrote this post to simplify the  installation process of gpu version of TensorFlow on Ubuntu 18.04. I have described installation steps below and hope that it will be helpful.\n\n## NVIDIA driver\nCheck the nvidia driver is installed by running the command 'nvidia-smi'. Normally, the command will be installed as part of the driver and expected to get the result below.\n\n\u003cimg src='images/smi.png'/\u003e\n\nIf you are not able to see the result like above picture, it may be due to either nvidia driver is not installed or nvidia-smi utility is missing. I had to run the below to install the nvidia driver and was successful with installation. \n#### Only follow below steps if you can't get information like above or driver is too old.\n\n* Run the below code to uninstall the existing nvidia driver and restart.\n```\nsudo apt-get purge nvidia*  \nsudo reboot\n```\n* Run the below code to install the nvidia driver 390 at the time of this post writing.\n```\nsudo apt-get install nvidia-390\n```\nAfter these steps, you have installed the nvidia driver and 'nvidia-smi' commad should give you some information about the GPU.\n\n## CUDA 9.0 installation \n\n* Download cuda9.0 installation file from [nvidia site](https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux\u0026target_arch=x86_64\u0026target_distro=Ubuntu\u0026target_version=1704\u0026target_type=runfilelocal).\n\u003cimg src='images/cuda.png'/\u003e\n\n* Change the permission of the downloaded file\n\n```\nsudo chmod +x cuda_9.0.176_384.81_linux.run\n```\n\n* The run the file\n\n```\n./cuda_9.0.176_384.81_linux.run\n```\n\nAccept the terms and condition and make sure you type 'no' to the accelerated graphics driver installation question. Also make sure type 'yes' to symoblic link question.\n\n\u003cimg src=\"images/cuda_step.png\"/\u003e\n\n## CUDANN 7.2.1 installation\n\nNext, Download the file from [nvidia site](https://developer.nvidia.com/rdp/cudnn-download#a-collapse721-9).\n\n\u003cimg src=\"images/cudnn.png\"/\u003e\n\nPlease make sure you have downloaded the first option cuDNN v7.2.1 Library for Linux.\nOnce you have downloaded, follow the below steps:\n* Extract and copy\n```\nsudo tar -xzvf \nsudo cp cuda/include/cudnn.h /usr/local/cuda/include\nsudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64\nsudo chmod a+r /usr/local/cuda/include/cudnn.h \nsudo chmod a+r /usr/local/cuda/lib64/libcudnn*\n```\n* Copy below commands to ~/.bashrc\n```\nexport LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64\"\nexport CUDA_HOME=/usr/local/cuda\nexport PATH=\"$PATH:/usr/local/cuda/bin\"\n```\n* Run the below command to source\n```\nsource ~/.bashrc\n```\n\n## Miniconda installation\nAt this stage we have installed all the required software for Tensorflow gpu version to work. Now, we need to install the miniconda software that will enable us to create python virtual environments. \n```\nwget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh\nbash Miniconda3-latest-Linux-x86_64.sh\n```\nDuring the installation, it will be asked to append the path to ~/.bahrc and type yes to append them.\n\n## Tensorflow gpu installation\nFinally, we are ready to install the gpu version of Tensorflow. We need to run below steps to get there:\n* Create virtual environment. \n```\nconda create -n tensorflow_gpu\n```\n* Get into the environment\n```\nsource activate tensorflow_gpu\n```\n* Install tensorflow-gpu\n```\npip install tensorflow-gpu\n```\n* Check the installation by create a file called 'test.py' and add below commands to it\n```\nimport tensorflow as tf   \n\nhello = tf.constant('Hello there!')\n\nprint(sess.run(hello))\n```\n* Run 'python test. py' and you should be able to get 'Hello there!' message that is he indication gpu version tensorflow has been installed successfully. Otherwise, Installation failed.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkarunakaran%2Ftensorflow-gpu-ubuntu-18-04","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkarunakaran%2Ftensorflow-gpu-ubuntu-18-04","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkarunakaran%2Ftensorflow-gpu-ubuntu-18-04/lists"}