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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

107476630 yli96

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

Have you tried tensorflow2.3.0 ?

Thanks for your sharing. I followed your blog notes and have tried tensorflow2.3.0. but the error always occur.

My enviroment:

cuda9.0
tensorflow2.3.0

Error:

./tensorflow/stream_executor/lib/statusor_internals.h:165:76: error: invalid static_cast from type 'const Status {aka const tensorflow::Status}' to type 'stream_executor::port::Status& {aka tensorflow::Status&}'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /root/tensorflow-2.3.0/tensorflow/python/tools/BUILD:226:1 C++ compilation of rule '//tensorflow/core/kernels:conv_2d_gpu' failed (Exit 1)

Have you tried tensorflow2.3.0 ?

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.