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
#!/usr/bin/env python | |
# MIT License | |
# Copyright (c) 2017 Jetsonhacks | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
# Copyright (c) 2020, JetsonHacks. All rights reserved. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
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
# Copyright (c) 2020, JetsonHacks. All rights reserved. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
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
#!/bin/sh | |
# Set CPU to full performance on NVIDIA Jetson TK1 Development Kit | |
if [ $(id -u) != 0 ]; then | |
echo "This script requires root permissions" | |
echo "$ sudo "$0"" | |
exit | |
fi | |
# To obtain full performance on the CPU (eg: for performance measurements or benchmarking or when you don't care about power draw), you can disable CPU scaling and force the 4 main CPU cores to always run at max performance until 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
#!/bin/sh | |
# Fresh install for CUDA 6.5 on Jetson TK1 for Linux for Tegra (L4T) 21.1 | |
# CUDA 6.5 REQUIRES L4T 21.1 !!! | |
sudo apt-add-repository universe | |
sudo apt-get update | |
# This is for L4T r21.1 ; Update for your L4T i.e. r21.3 | |
wget http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda-repo-l4t-r21.1-6-5-prod_6.5-14_armhf.deb | |
# Install the CUDA repo metadata that you downloaded | |
# This is for L4T 21.1 ; Update for your L4T i.e. 21.3 |
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
#!/bin/sh | |
# Preview and save webcam video on NVIDIA Jetson TK1 | |
# Grab audio and video (in h264 format) from Logitech c920 @ 1920x1080 | |
# Preview @ 1280x720 on screen | |
# Store video to file named gEncode1080p.mp4 | |
# Logitech c920 is video1 on this machine | |
VELEM="v4l2src device=/dev/video1 do-timestamp=true" | |
# Video capability from the camera - get h264 1920x1080 | |
VCAPS="video/x-h264, width=1920, height=1080, framerate=30/1" |
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
#!/bin/sh | |
# Install Python prerequisites on NVIDIA Jetson TK1 for iTorch | |
# This is for https://github.com/facebook/iTorch | |
# L4T 21.3, Torch 7 (http://torch.ch) | |
# Python 2.7 or greater must be installed before running this script | |
# Torch 7 should already be installed before running this script | |
# iPython is loaded using pip, as repository version is 1.x version, > 2.0 is needed | |
# Need to compile from source as repository version libzmq3-dev is not the correct revision | |
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz | |
tar xzvf zeromq-4.0.5.tar.gz |
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
#!/bin/bash | |
#NVIDIA Jetson TK1 | |
#Create a swapfile for Ubuntu at the current directory location | |
fallocate -l 4G swapfile | |
#List out the file | |
ls -lh swapfile | |
# Change permissions so that only root can use it | |
chmod 600 swapfile | |
#List out the file | |
ls -lh swapfile |
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
#!/bin/sh | |
# Show a webcam that delivers video 1920x1080 MJPG on screen | |
VELEM="v4l2src device=/dev/video0" | |
VCAPS="image/jpeg, width=1920, height=1080, framerate=30/1" | |
VSOURCE="$VELEM ! $VCAPS" | |
VIDEO_SINK="videoconvert ! videoscale ! xvimagesink sync=false" | |
VIDEO_DECODE="jpegparse ! jpegdec" | |
# echo is just for debugging purposes | |
echo gst-launch-1.0 -vvv \ |
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
#!/bin/bash | |
cd $HOME | |
# Get TensorFlow build scripts from JasonAtNvidia JetsonTFBuild repository | |
git clone --no-checkout https://github.com/JasonAtNvidia/JetsonTFBuild.git | |
cd JetsonTFBuild | |
# Sparse checkout tells git not to checkout the wheels directory | |
# where all of the .whl files are kept | |
git config core.sparsecheckout true | |
# Do not checkout the wheels directory | |
echo '!wheels/*' >> .git/info/sparse-checkout |