sudo apt-get update
sudo apt-get install nvidia-384
sudo reboot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker run --rm -it -p 8888:8888 --name jupyterlab -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/work -e NB_UID=$(id -u) -e NB_GID=$(id -g) -e GRANT_SUDO=yes --user root zldrobit/jupyter:py27 | |
# sudo docker run --rm -p 8888:8888 -it --name jupyter -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/work -e NB_UID=0 -e NB_GID=0 -e GRANT_SUDO=yes --user root zldrobit/jupyter:py27 | |
sleep 3 | |
sudo docker exec jupyter jupyter notebook list | |
# echo 'jupyter is running.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# search file in git history by 'search_string' | |
# see https://stackoverflow.com/questions/4468361/search-all-of-git-history-for-a-string?rq=1 | |
git rev-list --all | GIT_PAGER=cat xargs git grep 'search_string' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from | |
# https://gitlab.com/nvidia/samples/blob/master/cuda/ubuntu16.04/ffmpeg-gpu/Dockerfile | |
# NVIDIA Video Codec SDK in ffmpeg | |
# https://www.ffmpeg.org/ | |
# https://developer.nvidia.com/ffmpeg | |
# FFmpeg is licensed under the GNU Lesser General Public License | |
# (LGPL) version 2.1 or later. | |
# FFmpeg incorporates several optional parts and optimizations that | |
# are covered by the GNU General Public License (GPL) version 2 or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nvidia-docker run --rm -it --name yolo_deepsort -v /home/utiva/workspace:/workspace \ | |
-e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ | |
-e QT_X11_NO_MITSHM=1 \ | |
-e NVIDIA_DRIVER_CAPABILITIES='compute,utility,display' \ | |
--privileged --device=/dev/video0:/dev/video0 --ipc=host\ | |
--device /dev/apex_0:/dev/apex_0 \ | |
-v /dev/bus/usb:/dev/bus/usb \ | |
${1:-zldrobit/yolo-deepsort} /bin/bash | |
# in supervisor: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config = tf.ConfigProto() | |
config.gpu_options.allow_growth = True | |
sess = tf.Session(config=config) | |
config = tf.compat.v1.ConfigProto() | |
config.gpu_options.allow_growth = True | |
session = tf.compat.v1.InteractiveSession(config=config) |
adb push path_to_gdbserver /data/local/tmp/gdbserver run-as package_name mkdir -p /data/data/package_name/gdb/bin cat /data/local/tmp/gdbserver | run-as package_name sh -c 'cat > /data/data/package_name/gdb/bin/gdbserver' run-as package_name chmod 700 /data/data/package_name/gdb/bin/gdbserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# execute following 2 lines | |
sudo nvidia-xconfig --enable-all-gpus | |
sudo nvidia-xconfig --cool-bits=4 | |
# append following to ~/.profile | |
# set GPU fan speed | |
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" | |
nvidia-settings -a "[fan:0]/GPUTargetFanSpeed=100" | |
nvidia-settings -a "[fan:1]/GPUTargetFanSpeed=100" |