cat /usr/local/cuda/version.txt
https://developer.nvidia.com/cuda-toolkit-archive
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
chmod +x cuda_9.0.176_384.81_linux-run
./cuda_9.0.176_384.81_linux-run --extract='/shared/why16gzl/'
./cuda-linux.9.0.176-22781540.run
import os
cuda_version_origin = os.popen('cat /usr/local/cuda/version.txt')
cuda_version_origin.read()
cuda_version_new = os.popen('nvcc --version')
cuda_version_new.read().split('\n')[-2]
os.popen('cat /shared/why16gzl/cuda-9.0/version.txt').read()
os.popen('cat /shared/why16gzl/cuda/cuda-9.2/version.txt').read()
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
tar -xzvf cudnn-9.0-linux-x64-v7.1.tgz
cp cuda/include/cudnn.h /usr/local/cuda-9.0/include
cp cuda/lib64/libcudnn* /usr/local/cuda-9.0/lib64
chmod a+r /usr/local/cuda-9.0/include/cudnn.h /usr/local/cuda-9.0/lib64/libcudnn*
Note: If you want to install under '/shared/why16gzl/cuda-9.0/'
,
replace '/usr/local/cuda-9.0/'
with '/shared/why16gzl/cuda-9.0/'
os.popen('cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2').read().split('\n')
os.popen('cat /shared/why16gzl/cuda/cuda-9.2/include/cudnn.h | grep CUDNN_MAJOR -A 2').read().split('\n')
os.popen('more ~/.bashrc').read().split('\n')[-11:-7]
os.popen('more ~/tf_1.12/bin/activate').read().split('\n')[-5:-1]
Inside this folder create a new virtual environment:
python -m venv tf_1.12
Then activate it:
source tf_1.12/bin/activate
Now, from inside the environment install ipykernel using pip:
pip install ipykernel
And now install a new kernel:
ipython kernel install --user --name=tf_1.12.0
os.popen('more /home1/w/why16gzl/.local/share/jupyter/kernels/tf_1.12/kernel.json').read().split('\n')[4:6]
os.popen('more /home1/w/why16gzl/.local/share/jupyter/kernels/tf_1.12.0/kernel.json').read().split('\n')[4:6]
'pip install tensorflow-gpu==1.12.0'
¶cd /shared/why16gzl
wget https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.12.0-cp36-cp36m-linux_x86_64.whl
mv tensorflow_gpu-1.12.0-cp36-cp36m-linux_x86_64.whl tensorflow_gpu-1.12.0-cp37-cp37m-linux_x86_64.whl
pip install tensorflow_gpu-1.12.0-cp37-cp37m-linux_x86_64.whl
import tensorflow as tf
tf.__version__
https://gist.github.com/zhanwenchen/e520767a409325d9961072f666815bb8
https://gist.github.com/niderhoff/52c514f20337516500084dd7b17af7e2
rsync
instead of scp
to transfer files¶rsync -e "ssh -p 2212" -avgpolr ./Downloads/cudnn-9.0-linux-x64-v7.1.tar.zip why@junnan:/u01/why/Downloads
git init
git lfs track "*.hdf5"
git add .
git add .gitattributes
git commit -m "add *.hdf5"
git remote add origin https://github.com/why2011btv/elmo_files.git
git push -u origin master
If you fail to push
, try to rm
all embedded .git
files