Giter Site home page Giter Site logo

tensorflow2.x-gpu-cuda9.0's Introduction

Tensorflow2.X-GPU-CUDA9.0

Tensorflow2.X-GPU-CUDA9.0

This Tensorflow2.X-GPU-CUDA9.0 is bazeled from the sorce code of Google.

Install

If you have configured cuda9 and cudnn in your .bashrc, you can skip to Third step.

First

Create cuda9.0 environment by conda

conda create -n cuda9.0
conda activate cuda9.0
conda install cudatoolkit=9.0 cudnn=7.6.0 cupti

Second

Add dependency in .bashrc

Use conda env list find the path of cuda9.0

conda env list
(tf2) wxy@sait:~$ conda info -e
# conda environments:
#
cuda9.0                  /disk1/lx/conda/envs/cuda9.0
mk                       /disk1/lx/conda/envs/mk

change the CONDA_ENV to your path of cuda9.0

add the following three lines of code in .bashrc

vim ~/.bashrc
export CONDA_ENV="/disk1/lx/conda/envs/cuda9.0"
export CUDA_HOME="$CUDA_HOME:$CONDA_ENV/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CONDA_ENV/lib" 

Then source .bashrc in you terminal.

source ~/.bashrc

Third

Download and unzip the .whl file

Google-drive: tensorflow2.1-gpu-cudn9.0-py3.7

Google-drive: tensorflow2.0-gpu-cudn9.0-py3.7

Google-drive: tensorflow2.0-gpu-cudn9.0-py3.6

Google-drive: tensorflow2.0-gpu-cudn9.0-py3.5

Create a new env in conda(you can change test to your like)

conda create -n test python=3.7
conda activate test
pip install tensorflow-2.0.0-cp37-cp37m-linux_x86_64.whl

Test

python

import tensorflow as tf
tf.test.is_gpu_available()

If it shows True, congratulations.

Error

W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.9.0';.....undefined symbol: GOMP_critical_end;

If you have this error, please add follow code in your code.

import tensorflow as tf
import ctypes
ctypes.CDLL("libgomp.so.1", mode=ctypes.RTLD_GLOBAL)

tf.test.is_gpu_available()

If it works , please give me a star.

Thank you!

How to install tensorflow2.X-GPU in your cuda version?

you need to bazel from the source code of tensorflow in your machine.

Reference

SmileTM Blog

How to install tensorflow2.0 in cuda9?

tensorflow2.x-gpu-cuda9.0's People

Contributors

smiletm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.