美文网首页
I. Foundation

I. Foundation

作者: 一生懸命 | 来源:发表于2017-05-25 15:08 被阅读1次

    Overview

    This platform is based on Ubuntu Server HWE 16.04.2. The following packages will be installed:

    • (Optional) bcache
    • Basic build environment
    • Proprietary Nvidia Driver
    • CUDA 8.0 and cuDNN 6.0
    • Oracle Java 8
    • Python 2.7, PIP, Virtualenv

    (Optional) bcache

    Ref: https://yq.aliyun.com/articles/60734
    Setup caching device, usually your SSD.

    make-bcache --help
    make-bcache -C -b 1MiB -w 4KiB --discard --cache_replacement_policy=lru /dev/[caching]
    

    Setup backing device, usually your RAID'ed HDDs.

    make-bcache -B --writeback -w 4KiB /dev/[backing] --wipe-bcache
    

    Register both of the devices. Seeing error messages for echo is fine.

    echo /dev/[caching] > /sys/fs/bcache/register
    echo /dev/[backing] > /sys/fs/bcache/register
    ll /sys/fs/bcache/ # get the cache set UUID
    lsblk # check backing device
    

    Attach caching to backing.

    echo [cache set UUID] > /sys/block/bcache0/bcache/attach
    cat /sys/block/bcache0/bcache/state 
    

    Format the bcache0 device as EXT4

    mkfs.ext4 /dev/bcache0 -m 0 -O extent,uninit_bg -E lazy_itable_init=1 -T largefile
    

    Basic build environment

    sudo apt install build-essential cmake pkg-config gfortran
    

    Nvidia Driver

    Install the proprietary GPU driver. Use the latest official release instead of the LTS version - usually the LTS version is too old to support the latest cards.

    sudo add-apt-repository -y ppa:graphics-drivers/ppa
    sudo apt -y update
    sudo apt -y install nvidia-381 mesa-common-dev freeglut3-dev
    

    Make sure it doesn't load the graphic login session.

    sudo systemctl set-default multi-user.target
    

    Install CUDA 8.0 and cuDNN 6.0

    sudo ./cuda_8.[..].run --tmpdir=/tmp
    

    Extract cuDNN to the cuda directory. Note: only cards which support CUDA compatibility (cc) 3.0+ could leverage cuDNN, and it covers Kepler, Maxwell, and the latest Pascal. Fermi doesn't support cuDNN.

    tar -xvf cudnn-8.0-linux-x64-v6.0.tgz -P /usr/local/cuda
    

    Add the following paths to .bashrc

    export PATH=$PATH:/usr/local/cuda-8.0/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
    

    Install Oracle Java 8

    Install Oracle Java with its proprietary binary.

    sudo add-apt-repository -y ppa:webupd8team/java
    sudo apt -y update
    sudo apt -y install oracle-java8-installer
    

    Check Java Compiler version and set default.

    javac -version
    sudo apt -y install oracle-java8-set-default
    

    Install Python 2.7, PIP, Virtualenv

    sudo apt -y install python-pip python-virtualenv
    

    相关文章

      网友评论

          本文标题:I. Foundation

          本文链接:https://www.haomeiwen.com/subject/qiczxxtx.html