How to install Tensorflow anaconda python 3.6 venv on ubuntu 16.04 server with GEForce RTX 2080

  1. Install cuda 9.0 without nvidia driver.
          - sudo chmod +x cuda_9.0.176_384.81_linux.run
          - sudo ./cuda_9.0.176_384.81_linux.run –extract=/home/username/Dirname
          - sudo ./cuda-linux.9.0.176-22781540.run
          - sudo ./cuda-samples.9.0.176-22781540-linux.run
                - install patch 1
                      - download patch 1
                      - sudo sh cuda_9.0.176.1_linux.run
                      - download patch 2
                      - sudo sh cuda_9.0.176.2_linux.run
                      - download patch 3
                      - sudo sh cuda_9.0.176.3_linux.run
                      - download patch 4
                      - sudo sh cuda_9.0.176.4_linux.run
  2. set cuda path variable
                - sudo cp ~/.bashrc ~/.bashrc_backup
                - sudo nano ~/.bashrc
                - export PATH=“/usr/local/cuda-9.0/bin:$PATH”
                - export LD_LIBRARY_PATH=“/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH”
  3. Install required cuDNN SDK for cuda 9.0.
  4. Download Anaconda and install Anaconda3-2018.12-Linux-x86_64.
          - sudo bash Anaconda3-2018.12-Linux-x86_64.sh.
          - sudo shutdown -r now.
  5. Create virtual env.
          - conda create -n unityMLAgent pip python=3.6
          - logout user(sometime required)
          - source activate unityMLAgent
  6. install tensorflow.
          - pip install –upgrade pip
          - pip install –ignore-installed –upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.12.0-cp36-cp36m-win_amd64.whl
                - tensorflow_gpu-1.12.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
          - If you received not supported wheel error try
          - pip install tensorflow , worked for me , but installed only GPU support.
          - pip install tensorflow-gpu , installed gpu support but downgrade python to 2.7.
  7. To install GPU support with python 3.6       - source deactivate unityMLAgent
          - Download tensorflow_gpu-1.12.0-cp35-cp35m-linux_x86_64.whl
          - mv tensorflow_gpu-1.12.0-cp35-cp35m-linux_x86_64.whl tensorflow_gpu-1.12.0-cp36-cp36m-linux_x86_64.whl.
          - pip install –ignore-installed –upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.12.0-cp36-cp36m-linux_x86_64.whl
          - I have kept renamed whl file to my /home/user/Download directory and executed pip install also from Download directory
          - possible error
                - mkl-random 1.0.1 requires cython, which is not installed.
          - Install cython
                - pip install –upgrade pip
                - pip install cython
  8. Verify Tensorflow installation.
          - python
          - import tensorflow
          - If installtion fail import will throw some error msg.

Related