ML Related
1. Jupyter Notebook
nohup jupyter notebook --no-browser --port=8888 --ip=localhost &
2. TensorBoard
tensorboard --logdir='./log' --port=10066
tensorboardX:
from tensorboardX import SummaryWriter
self.writer = SummaryWriter('log')
self.writer.add_scalar('loss', loss, update_time)
3. CUDA
3.1 CUDA Environment
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
3.2 CUDA version mismatches GPU
export TORCH_CUDA_ARCH_LIST="7.5"
4. Show Processes
Show dead processes that cannot be shown by nvidia-smi
.
fuser -v /dev/nvidia*
5. conda pack
conda activate base
conda pack -n my_env --ignore-editable-packages
tar -xzf my_env.tar.gz -C my_env
# move
conda-unpack
6. Nvidia
6.1 driver
dpkg -l | grep nvidia
# remove driver
sudo apt remove --purge 'nvidia-.*'
sudo apt-get autoremove
# to fix: ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.
apt install linux-source
apt install linux-headers-$(uname -r)
Last update:
January 7, 2022
Authors: