學習筆記-深度學習框架(Tensorflow2.1.0)

GitHub學習筆記地址

apt-get install python3
apt-get install python
sudo apt-get install python-pip
(sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update)
sudo apt-get install python3-pip
sudo pip3 install -u virtualenv
virtualenv --system-site-packages -p python3 ./tf_py3
source ./tf_py3/bin/activate
pip install tensorflow
print(tf.version)
pip install numpy matplotlib sklearn pandas jupyter
jupyter notebook

Ubuntu 18.04(CUDA 10.1)

vim install_cuda.sh

# Add NVIDIA package repositories
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.1.243-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt-get update

# Install NVIDIA driver
sudo apt-get install --no-install-recommends nvidia-driver-418
# Reboot. Check that GPUs are visible using the command: nvidia-smi

# Install development and runtime libraries (~4GB)
sudo apt-get install --no-install-recommends \
    cuda-10-1 \
    libcudnn7=7.6.4.38-1+cuda10.1  \
    libcudnn7-dev=7.6.4.38-1+cuda10.1


# Install TensorRT. Requires that libcudnn7 is installed above.
sudo apt-get install -y --no-install-recommends libnvinfer6=6.0.1-1+cuda10.1 \
    libnvinfer-dev=6.0.1-1+cuda10.1 \
    libnvinfer-plugin6=6.0.1-1+cuda10.1

sh +x intall_cuda.sh
nvidia-smi
(libninfer5 not match version)
sudo apt-get install python3-dev python3-pip
sudo pip3 install -U virtualenv
virtualenv --system-site-packages -p python3 ./tf2_py3
source tf2_py3/bin/activate
pip install --upgrade tensorflow-gpu ==2.1.0
print(tf.version)
tf.test.is_gpu_available()

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章