Skip to content

Instantly share code, notes, and snippets.

# 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"

yolov4

yolov4 tiny

Push gdbserver if there isn't

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

Run app manually on device

@zldrobit
zldrobit / check_cuda_cudnn.md
Created June 19, 2020 07:14 — forked from Jongbhin/check_cuda_cudnn.md
[Cuda cudnn version check] #cuda #cudnn #nvidia

To check nvidia driver

modinfo nvidia

To check cuda version

cat /usr/local/cuda/version.txt
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)
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:
@zldrobit
zldrobit / ffmpeg-nvidia-docker.build
Last active May 21, 2019 03:56
ffmpeg multi-stage build for nvidia docker
# 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