jetson-examples 0.1.8__py3-none-any.whl → 0.1.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jetson_examples-0.1.8.dist-info → jetson_examples-0.1.9.dist-info}/LICENSE +21 -21
- {jetson_examples-0.1.8.dist-info → jetson_examples-0.1.9.dist-info}/METADATA +1 -1
- jetson_examples-0.1.9.dist-info/RECORD +109 -0
- reComputer/__init__.py +1 -1
- reComputer/main.py +60 -60
- reComputer/scripts/MoveNet-Lightning/clean.sh +8 -8
- reComputer/scripts/MoveNet-Lightning/getVersion.sh +59 -59
- reComputer/scripts/MoveNet-Lightning/init.sh +6 -6
- reComputer/scripts/MoveNet-Lightning/readme.md +30 -30
- reComputer/scripts/MoveNet-Lightning/run.sh +19 -19
- reComputer/scripts/MoveNet-Thunder/clean.sh +7 -7
- reComputer/scripts/MoveNet-Thunder/getVersion.sh +59 -59
- reComputer/scripts/MoveNet-Thunder/init.sh +6 -6
- reComputer/scripts/MoveNet-Thunder/readme.md +31 -31
- reComputer/scripts/MoveNet-Thunder/run.sh +18 -18
- reComputer/scripts/MoveNetJS/clean.sh +4 -4
- reComputer/scripts/MoveNetJS/readme.md +56 -56
- reComputer/scripts/MoveNetJS/run.sh +13 -13
- reComputer/scripts/Sheared-LLaMA-2.7B-ShareGPT/init.sh +16 -16
- reComputer/scripts/Sheared-LLaMA-2.7B-ShareGPT/run.sh +8 -8
- reComputer/scripts/audiocraft/README.md +35 -35
- reComputer/scripts/audiocraft/clean.sh +5 -5
- reComputer/scripts/audiocraft/init.sh +16 -16
- reComputer/scripts/audiocraft/run.sh +7 -7
- reComputer/scripts/check.sh +4 -4
- reComputer/scripts/clean.sh +33 -33
- reComputer/scripts/comfyui/LICENSE +21 -21
- reComputer/scripts/comfyui/README.md +127 -127
- reComputer/scripts/comfyui/clean.sh +9 -7
- reComputer/scripts/comfyui/config.yaml +30 -29
- reComputer/scripts/comfyui/init.sh +9 -163
- reComputer/scripts/comfyui/run.sh +30 -30
- reComputer/scripts/depth-anything/Dockerfile +5 -5
- reComputer/scripts/depth-anything/LICENSE +21 -21
- reComputer/scripts/depth-anything/README.md +135 -135
- reComputer/scripts/depth-anything/clean.sh +7 -7
- reComputer/scripts/depth-anything/config.yaml +31 -31
- reComputer/scripts/depth-anything/init.sh +164 -164
- reComputer/scripts/depth-anything/run.sh +22 -22
- reComputer/scripts/depth-anything-v2/Dockerfile +5 -5
- reComputer/scripts/depth-anything-v2/LICENSE +21 -21
- reComputer/scripts/depth-anything-v2/README.md +135 -135
- reComputer/scripts/depth-anything-v2/clean.sh +7 -7
- reComputer/scripts/depth-anything-v2/config.yaml +31 -31
- reComputer/scripts/depth-anything-v2/init.sh +164 -164
- reComputer/scripts/depth-anything-v2/run.sh +22 -22
- reComputer/scripts/live-llava/init.sh +16 -16
- reComputer/scripts/live-llava/run.sh +278 -278
- reComputer/scripts/llama-factory/README.md +68 -68
- reComputer/scripts/llama-factory/clean.sh +4 -4
- reComputer/scripts/llama-factory/init.sh +52 -52
- reComputer/scripts/llama-factory/run.sh +10 -10
- reComputer/scripts/llama3/clean.sh +22 -22
- reComputer/scripts/llama3/config.yaml +31 -0
- reComputer/scripts/llama3/init.sh +19 -16
- reComputer/scripts/llama3/run.sh +13 -13
- reComputer/scripts/llava/clean.sh +3 -3
- reComputer/scripts/llava/init.sh +16 -16
- reComputer/scripts/llava/run.sh +9 -9
- reComputer/scripts/llava-v1.5-7b/init.sh +16 -16
- reComputer/scripts/llava-v1.5-7b/run.sh +9 -9
- reComputer/scripts/llava-v1.6-vicuna-7b/init.sh +16 -16
- reComputer/scripts/llava-v1.6-vicuna-7b/run.sh +10 -10
- reComputer/scripts/nanodb/init.sh +16 -16
- reComputer/scripts/nanodb/readme.md +10 -10
- reComputer/scripts/nanodb/run.sh +90 -90
- reComputer/scripts/nanoowl/init.sh +16 -16
- reComputer/scripts/nanoowl/run.sh +7 -7
- reComputer/scripts/ollama/clean.sh +22 -22
- reComputer/scripts/ollama/config.yaml +31 -0
- reComputer/scripts/ollama/init.sh +19 -16
- reComputer/scripts/ollama/run.sh +10 -10
- reComputer/scripts/parler-tts/clean.sh +7 -7
- reComputer/scripts/parler-tts/getVersion.sh +59 -59
- reComputer/scripts/parler-tts/init.sh +8 -8
- reComputer/scripts/parler-tts/readme.md +63 -63
- reComputer/scripts/parler-tts/run.sh +17 -17
- reComputer/scripts/run.sh +48 -48
- reComputer/scripts/stable-diffusion-webui/init.sh +16 -16
- reComputer/scripts/stable-diffusion-webui/run.sh +6 -6
- reComputer/scripts/text-generation-webui/init.sh +16 -16
- reComputer/scripts/text-generation-webui/run.sh +11 -11
- reComputer/scripts/ultralytics-yolo/LICENSE +21 -21
- reComputer/scripts/ultralytics-yolo/README.md +124 -124
- reComputer/scripts/ultralytics-yolo/clean.sh +6 -6
- reComputer/scripts/ultralytics-yolo/config.yaml +31 -31
- reComputer/scripts/ultralytics-yolo/init.sh +4 -4
- reComputer/scripts/ultralytics-yolo/run.sh +26 -26
- reComputer/scripts/update.sh +26 -26
- reComputer/scripts/utils.sh +168 -166
- reComputer/scripts/whisper/init.sh +16 -16
- reComputer/scripts/whisper/run.sh +7 -7
- reComputer/scripts/yolov10/Dockerfile +13 -13
- reComputer/scripts/yolov10/README.md +71 -71
- reComputer/scripts/yolov10/clean.sh +4 -4
- reComputer/scripts/yolov10/config.yaml +31 -31
- reComputer/scripts/yolov10/init.sh +20 -20
- reComputer/scripts/yolov10/run.sh +7 -7
- reComputer/scripts/yolov8-rail-inspection/config.yaml +31 -31
- reComputer/scripts/yolov8-rail-inspection/init.sh +5 -5
- reComputer/scripts/yolov8-rail-inspection/readme.md +35 -35
- reComputer/scripts/yolov8-rail-inspection/run.sh +21 -21
- jetson_examples-0.1.8.dist-info/RECORD +0 -107
- {jetson_examples-0.1.8.dist-info → jetson_examples-0.1.9.dist-info}/WHEEL +0 -0
- {jetson_examples-0.1.8.dist-info → jetson_examples-0.1.9.dist-info}/entry_points.txt +0 -0
- {jetson_examples-0.1.8.dist-info → jetson_examples-0.1.9.dist-info}/top_level.txt +0 -0
@@ -1,164 +1,164 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
#set color value
|
3
|
-
RED=$(tput setaf 1)
|
4
|
-
GREEN=$(tput setaf 2)
|
5
|
-
YELLOW=$(tput setaf 3)
|
6
|
-
BLUE=$(tput setaf 4)
|
7
|
-
MAGENTA=$(tput setaf 5)
|
8
|
-
CYAN=$(tput setaf 6)
|
9
|
-
RESET=$(tput sgr0)
|
10
|
-
|
11
|
-
echo "${CYAN}This script will install the necessary packages and configurations for running depth-anything on a Jetson Nano.${RESET}"
|
12
|
-
|
13
|
-
# Install yq for parsing YAML files
|
14
|
-
sudo apt-get update
|
15
|
-
sudo apt-get install -y jq
|
16
|
-
|
17
|
-
# Read configuration
|
18
|
-
CURRENT_DIR="depth-anything-v2"
|
19
|
-
CONFIG_FILE="./jetson-examples/reComputer/scripts/${CURRENT_DIR}/config.yaml"
|
20
|
-
ALLOWED_L4T_VERSIONS=$(yq -r '.allowed_l4t_versions[]' $CONFIG_FILE)
|
21
|
-
ALLOWED_L4T_VERSIONS_ARRAY=($ALLOWED_L4T_VERSIONS)
|
22
|
-
REQUIRED_DISK_SPACE=$(yq -r '.required_disk_space' $CONFIG_FILE)
|
23
|
-
MIN_MEM_GB=$(yq -r '.min_mem_gb' $CONFIG_FILE)
|
24
|
-
MIN_SWAP_GB=$(yq -r '.min_swap_gb' $CONFIG_FILE)
|
25
|
-
NVIDIA_JETSON_PACKAGE=$(yq -r '.nvidia_jetson_package' $CONFIG_FILE)
|
26
|
-
PACKAGES=$(yq -r '.packages[]' $CONFIG_FILE)
|
27
|
-
DESIRED_DAEMON_JSON=$(yq -r '.docker.desired_daemon_json' $CONFIG_FILE)
|
28
|
-
CURRENT_DISK_SPACE=$(df -BG --output=avail / | tail -1 | sed 's/[^0-9]*//g')
|
29
|
-
MEM_GB=$(free -g | awk '/^Mem:/{print $2}')
|
30
|
-
SWAP_GB=$(free -g | awk '/^Swap:/{print $2}')
|
31
|
-
|
32
|
-
echo "${MAGENTA}Allowed L4T versions:${RESET} ${GREEN}$ALLOWED_L4T_VERSIONS ${RESET}"
|
33
|
-
echo "${MAGENTA}Required disk space: ${GREEN}${REQUIRED_DISK_SPACE}G ${RESET}"
|
34
|
-
echo "${MAGENTA}Minimum memory: ${GREEN}${MIN_MEM_GB}G ${RESET}"
|
35
|
-
echo "${MAGENTA}Minimum swap: ${GREEN}${MIN_SWAP_GB}G ${RESET}"
|
36
|
-
echo "${MAGENTA}NVIDIA Jetson package:${RESET} ${GREEN}$NVIDIA_JETSON_PACKAGE ${RESET}"
|
37
|
-
echo "${MAGENTA}Additional packages: ${RESET} ${GREEN}$PACKAGES ${RESET}"
|
38
|
-
|
39
|
-
# Check if NVIDIA Jetson package is installed
|
40
|
-
if ! dpkg -l | grep -qw "$NVIDIA_JETSON_PACKAGE"; then
|
41
|
-
echo "$NVIDIA_JETSON_PACKAGE is not installed. Installing $NVIDIA_JETSON_PACKAGE..."
|
42
|
-
sudo apt-get install -y $NVIDIA_JETSON_PACKAGE
|
43
|
-
else
|
44
|
-
echo "$NVIDIA_JETSON_PACKAGE is installed: ${GREEN}OK!${RESET}"
|
45
|
-
fi
|
46
|
-
|
47
|
-
# Install additional packages
|
48
|
-
for PACKAGE in $PACKAGES; do
|
49
|
-
if ! dpkg -l | grep -qw "$PACKAGE"; then
|
50
|
-
echo "$PACKAGE is not installed. Installing $PACKAGE..."
|
51
|
-
sudo apt-get install -y $PACKAGE
|
52
|
-
else
|
53
|
-
echo "$PACKAGE is installed: ${GREEN}OK!${RESET}"
|
54
|
-
fi
|
55
|
-
done
|
56
|
-
|
57
|
-
# Get system architecture
|
58
|
-
ARCH=$(uname -i)
|
59
|
-
if [ "$ARCH" = "aarch64" ]; then
|
60
|
-
# Check for L4T version string
|
61
|
-
L4T_VERSION_STRING=$(head -n 1 /etc/nv_tegra_release)
|
62
|
-
|
63
|
-
if [ -z "$L4T_VERSION_STRING" ]; then
|
64
|
-
L4T_VERSION_STRING=$(dpkg-query --showformat='${Version}' --show nvidia-l4t-core)
|
65
|
-
fi
|
66
|
-
|
67
|
-
L4T_RELEASE=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ' ' | grep -Po '(?<=R)[^;]+')
|
68
|
-
L4T_REVISION=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ',' | grep -Po '(?<=REVISION: )[^;]+')
|
69
|
-
L4T_VERSION="$L4T_RELEASE.$L4T_REVISION"
|
70
|
-
|
71
|
-
elif [ "$ARCH" = "x86_64" ]; then
|
72
|
-
echo "${RED}Unsupported architecture: $ARCH${RESET}"
|
73
|
-
exit 1
|
74
|
-
fi
|
75
|
-
|
76
|
-
|
77
|
-
# Check L4T version
|
78
|
-
if [[ " ${ALLOWED_L4T_VERSIONS_ARRAY[@]} " =~ " ${L4T_VERSION} " ]]; then
|
79
|
-
echo "L4T VERSION ${GREEN}${L4T_VERSION}${RESET} is in the allowed: ${GREEN}OK!${RESET}"
|
80
|
-
else
|
81
|
-
echo "${RED}L4T VERSION ${GREEN}${L4T_VERSION}${RESET}${RED} is not in the allowed versions list.${RESET}"
|
82
|
-
exit 1
|
83
|
-
fi
|
84
|
-
|
85
|
-
# Check disk space
|
86
|
-
if [ "$CURRENT_DISK_SPACE" -lt "$REQUIRED_DISK_SPACE" ]; then
|
87
|
-
echo "${RED}Insufficient disk space. Required: ${REQUIRED_DISK_SPACE}G, Available: ${CURRENT_DISK_SPACE}G. ${RESET}"
|
88
|
-
exit 1
|
89
|
-
else
|
90
|
-
echo "Required ${GREEN}${REQUIRED_DISK_SPACE}${RESET} G disk space: ${GREEN}OK!${RESET}"
|
91
|
-
fi
|
92
|
-
|
93
|
-
# Check memory and swap space
|
94
|
-
if [ "$MEM_GB" -lt "$MIN_MEM_GB" ]; then
|
95
|
-
echo "${RED}Insufficient memory: $MEM_GB GB (minimum required: $MIN_MEM_GB GB).${RESET}"
|
96
|
-
exit 1
|
97
|
-
else
|
98
|
-
echo "Required ${GREEN}$MIN_MEM_GB${RESET} G memory space: ${GREEN}OK!${RESET}"
|
99
|
-
fi
|
100
|
-
|
101
|
-
if [ "$SWAP_GB" -lt "$MIN_SWAP_GB" ]; then
|
102
|
-
echo "${RED}Insufficient swap space: $SWAP_GB GB (minimum required: $MIN_SWAP_GB GB). ${RESET}"
|
103
|
-
exit 1
|
104
|
-
else
|
105
|
-
echo "Required ${GREEN}$MIN_SWAP_GB${RESET} G swap space: ${GREEN}OK!${RESET}"
|
106
|
-
fi
|
107
|
-
|
108
|
-
# Check if Docker is installed
|
109
|
-
if ! command -v docker &> /dev/null; then
|
110
|
-
echo "${BLUE}Docker is not installed. Installing Docker...${RESET}"
|
111
|
-
|
112
|
-
sudo apt-get install -y \
|
113
|
-
apt-transport-https \
|
114
|
-
ca-certificates \
|
115
|
-
curl \
|
116
|
-
software-properties-common
|
117
|
-
|
118
|
-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
119
|
-
sudo add-apt-repository \
|
120
|
-
"deb [arch=arm64] https://download.docker.com/linux/ubuntu \
|
121
|
-
$(lsb_release -cs) \
|
122
|
-
stable"
|
123
|
-
|
124
|
-
sudo apt-get update
|
125
|
-
sudo apt-get install -y docker-ce
|
126
|
-
sudo systemctl enable docker
|
127
|
-
sudo systemctl start docker
|
128
|
-
sudo usermod -aG docker $USER
|
129
|
-
sudo systemctl restart docker
|
130
|
-
newgrp docker
|
131
|
-
|
132
|
-
echo "Docker has been installed and configured."
|
133
|
-
fi
|
134
|
-
|
135
|
-
# Check if the current user has permissions to use Docker
|
136
|
-
if ! docker info &> /dev/null; then
|
137
|
-
echo "The current user does not have permissions to use Docker. Adding permissions..."
|
138
|
-
sudo usermod -aG docker $USER
|
139
|
-
sudo systemctl restart docker
|
140
|
-
newgrp docker
|
141
|
-
echo "${BLUE}Permissions added. Please log out and log back in for the changes to take effect.${RESET}"
|
142
|
-
else
|
143
|
-
echo "${GREEN}Docker is installed and the current user has permissions to use it.${RESET}"
|
144
|
-
fi
|
145
|
-
|
146
|
-
DAEMON_JSON_PATH="/etc/docker/daemon.json"
|
147
|
-
if [ ! -f "$DAEMON_JSON_PATH" ] || [ "$(cat $DAEMON_JSON_PATH)" != "$DESIRED_DAEMON_JSON" ]; then
|
148
|
-
echo "${BLUE}Creating/updating $DAEMON_JSON_PATH with the desired content...${RESET}"
|
149
|
-
echo "$DESIRED_DAEMON_JSON" | sudo tee $DAEMON_JSON_PATH > /dev/null
|
150
|
-
sudo systemctl restart docker
|
151
|
-
echo "${GREEN}$DAEMON_JSON_PATH has been created/updated.${RESET}"
|
152
|
-
else
|
153
|
-
echo "${GREEN}$DAEMON_JSON_PATH already exists and has the correct content.${RESET}"
|
154
|
-
fi
|
155
|
-
|
156
|
-
# Install additional packages
|
157
|
-
for PACKAGE in $PACKAGES; do
|
158
|
-
if ! dpkg -l | grep -qw "$PACKAGE"; then
|
159
|
-
echo "${CYAN}$PACKAGE${RESET} ${BLUE}is not installed. Installing $PACKAGE...${RESET}"
|
160
|
-
sudo apt-get install -y $PACKAGE
|
161
|
-
else
|
162
|
-
echo "${GREEN}$PACKAGE${RESET} is already installed: ${GREEN}OK!${RESET}"
|
163
|
-
fi
|
164
|
-
done
|
1
|
+
#!/bin/bash
|
2
|
+
#set color value
|
3
|
+
RED=$(tput setaf 1)
|
4
|
+
GREEN=$(tput setaf 2)
|
5
|
+
YELLOW=$(tput setaf 3)
|
6
|
+
BLUE=$(tput setaf 4)
|
7
|
+
MAGENTA=$(tput setaf 5)
|
8
|
+
CYAN=$(tput setaf 6)
|
9
|
+
RESET=$(tput sgr0)
|
10
|
+
|
11
|
+
echo "${CYAN}This script will install the necessary packages and configurations for running depth-anything on a Jetson Nano.${RESET}"
|
12
|
+
|
13
|
+
# Install yq for parsing YAML files
|
14
|
+
sudo apt-get update
|
15
|
+
sudo apt-get install -y jq
|
16
|
+
|
17
|
+
# Read configuration
|
18
|
+
CURRENT_DIR="depth-anything-v2"
|
19
|
+
CONFIG_FILE="./jetson-examples/reComputer/scripts/${CURRENT_DIR}/config.yaml"
|
20
|
+
ALLOWED_L4T_VERSIONS=$(yq -r '.allowed_l4t_versions[]' $CONFIG_FILE)
|
21
|
+
ALLOWED_L4T_VERSIONS_ARRAY=($ALLOWED_L4T_VERSIONS)
|
22
|
+
REQUIRED_DISK_SPACE=$(yq -r '.required_disk_space' $CONFIG_FILE)
|
23
|
+
MIN_MEM_GB=$(yq -r '.min_mem_gb' $CONFIG_FILE)
|
24
|
+
MIN_SWAP_GB=$(yq -r '.min_swap_gb' $CONFIG_FILE)
|
25
|
+
NVIDIA_JETSON_PACKAGE=$(yq -r '.nvidia_jetson_package' $CONFIG_FILE)
|
26
|
+
PACKAGES=$(yq -r '.packages[]' $CONFIG_FILE)
|
27
|
+
DESIRED_DAEMON_JSON=$(yq -r '.docker.desired_daemon_json' $CONFIG_FILE)
|
28
|
+
CURRENT_DISK_SPACE=$(df -BG --output=avail / | tail -1 | sed 's/[^0-9]*//g')
|
29
|
+
MEM_GB=$(free -g | awk '/^Mem:/{print $2}')
|
30
|
+
SWAP_GB=$(free -g | awk '/^Swap:/{print $2}')
|
31
|
+
|
32
|
+
echo "${MAGENTA}Allowed L4T versions:${RESET} ${GREEN}$ALLOWED_L4T_VERSIONS ${RESET}"
|
33
|
+
echo "${MAGENTA}Required disk space: ${GREEN}${REQUIRED_DISK_SPACE}G ${RESET}"
|
34
|
+
echo "${MAGENTA}Minimum memory: ${GREEN}${MIN_MEM_GB}G ${RESET}"
|
35
|
+
echo "${MAGENTA}Minimum swap: ${GREEN}${MIN_SWAP_GB}G ${RESET}"
|
36
|
+
echo "${MAGENTA}NVIDIA Jetson package:${RESET} ${GREEN}$NVIDIA_JETSON_PACKAGE ${RESET}"
|
37
|
+
echo "${MAGENTA}Additional packages: ${RESET} ${GREEN}$PACKAGES ${RESET}"
|
38
|
+
|
39
|
+
# Check if NVIDIA Jetson package is installed
|
40
|
+
if ! dpkg -l | grep -qw "$NVIDIA_JETSON_PACKAGE"; then
|
41
|
+
echo "$NVIDIA_JETSON_PACKAGE is not installed. Installing $NVIDIA_JETSON_PACKAGE..."
|
42
|
+
sudo apt-get install -y $NVIDIA_JETSON_PACKAGE
|
43
|
+
else
|
44
|
+
echo "$NVIDIA_JETSON_PACKAGE is installed: ${GREEN}OK!${RESET}"
|
45
|
+
fi
|
46
|
+
|
47
|
+
# Install additional packages
|
48
|
+
for PACKAGE in $PACKAGES; do
|
49
|
+
if ! dpkg -l | grep -qw "$PACKAGE"; then
|
50
|
+
echo "$PACKAGE is not installed. Installing $PACKAGE..."
|
51
|
+
sudo apt-get install -y $PACKAGE
|
52
|
+
else
|
53
|
+
echo "$PACKAGE is installed: ${GREEN}OK!${RESET}"
|
54
|
+
fi
|
55
|
+
done
|
56
|
+
|
57
|
+
# Get system architecture
|
58
|
+
ARCH=$(uname -i)
|
59
|
+
if [ "$ARCH" = "aarch64" ]; then
|
60
|
+
# Check for L4T version string
|
61
|
+
L4T_VERSION_STRING=$(head -n 1 /etc/nv_tegra_release)
|
62
|
+
|
63
|
+
if [ -z "$L4T_VERSION_STRING" ]; then
|
64
|
+
L4T_VERSION_STRING=$(dpkg-query --showformat='${Version}' --show nvidia-l4t-core)
|
65
|
+
fi
|
66
|
+
|
67
|
+
L4T_RELEASE=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ' ' | grep -Po '(?<=R)[^;]+')
|
68
|
+
L4T_REVISION=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ',' | grep -Po '(?<=REVISION: )[^;]+')
|
69
|
+
L4T_VERSION="$L4T_RELEASE.$L4T_REVISION"
|
70
|
+
|
71
|
+
elif [ "$ARCH" = "x86_64" ]; then
|
72
|
+
echo "${RED}Unsupported architecture: $ARCH${RESET}"
|
73
|
+
exit 1
|
74
|
+
fi
|
75
|
+
|
76
|
+
|
77
|
+
# Check L4T version
|
78
|
+
if [[ " ${ALLOWED_L4T_VERSIONS_ARRAY[@]} " =~ " ${L4T_VERSION} " ]]; then
|
79
|
+
echo "L4T VERSION ${GREEN}${L4T_VERSION}${RESET} is in the allowed: ${GREEN}OK!${RESET}"
|
80
|
+
else
|
81
|
+
echo "${RED}L4T VERSION ${GREEN}${L4T_VERSION}${RESET}${RED} is not in the allowed versions list.${RESET}"
|
82
|
+
exit 1
|
83
|
+
fi
|
84
|
+
|
85
|
+
# Check disk space
|
86
|
+
if [ "$CURRENT_DISK_SPACE" -lt "$REQUIRED_DISK_SPACE" ]; then
|
87
|
+
echo "${RED}Insufficient disk space. Required: ${REQUIRED_DISK_SPACE}G, Available: ${CURRENT_DISK_SPACE}G. ${RESET}"
|
88
|
+
exit 1
|
89
|
+
else
|
90
|
+
echo "Required ${GREEN}${REQUIRED_DISK_SPACE}${RESET} G disk space: ${GREEN}OK!${RESET}"
|
91
|
+
fi
|
92
|
+
|
93
|
+
# Check memory and swap space
|
94
|
+
if [ "$MEM_GB" -lt "$MIN_MEM_GB" ]; then
|
95
|
+
echo "${RED}Insufficient memory: $MEM_GB GB (minimum required: $MIN_MEM_GB GB).${RESET}"
|
96
|
+
exit 1
|
97
|
+
else
|
98
|
+
echo "Required ${GREEN}$MIN_MEM_GB${RESET} G memory space: ${GREEN}OK!${RESET}"
|
99
|
+
fi
|
100
|
+
|
101
|
+
if [ "$SWAP_GB" -lt "$MIN_SWAP_GB" ]; then
|
102
|
+
echo "${RED}Insufficient swap space: $SWAP_GB GB (minimum required: $MIN_SWAP_GB GB). ${RESET}"
|
103
|
+
exit 1
|
104
|
+
else
|
105
|
+
echo "Required ${GREEN}$MIN_SWAP_GB${RESET} G swap space: ${GREEN}OK!${RESET}"
|
106
|
+
fi
|
107
|
+
|
108
|
+
# Check if Docker is installed
|
109
|
+
if ! command -v docker &> /dev/null; then
|
110
|
+
echo "${BLUE}Docker is not installed. Installing Docker...${RESET}"
|
111
|
+
|
112
|
+
sudo apt-get install -y \
|
113
|
+
apt-transport-https \
|
114
|
+
ca-certificates \
|
115
|
+
curl \
|
116
|
+
software-properties-common
|
117
|
+
|
118
|
+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
119
|
+
sudo add-apt-repository \
|
120
|
+
"deb [arch=arm64] https://download.docker.com/linux/ubuntu \
|
121
|
+
$(lsb_release -cs) \
|
122
|
+
stable"
|
123
|
+
|
124
|
+
sudo apt-get update
|
125
|
+
sudo apt-get install -y docker-ce
|
126
|
+
sudo systemctl enable docker
|
127
|
+
sudo systemctl start docker
|
128
|
+
sudo usermod -aG docker $USER
|
129
|
+
sudo systemctl restart docker
|
130
|
+
newgrp docker
|
131
|
+
|
132
|
+
echo "Docker has been installed and configured."
|
133
|
+
fi
|
134
|
+
|
135
|
+
# Check if the current user has permissions to use Docker
|
136
|
+
if ! docker info &> /dev/null; then
|
137
|
+
echo "The current user does not have permissions to use Docker. Adding permissions..."
|
138
|
+
sudo usermod -aG docker $USER
|
139
|
+
sudo systemctl restart docker
|
140
|
+
newgrp docker
|
141
|
+
echo "${BLUE}Permissions added. Please log out and log back in for the changes to take effect.${RESET}"
|
142
|
+
else
|
143
|
+
echo "${GREEN}Docker is installed and the current user has permissions to use it.${RESET}"
|
144
|
+
fi
|
145
|
+
|
146
|
+
DAEMON_JSON_PATH="/etc/docker/daemon.json"
|
147
|
+
if [ ! -f "$DAEMON_JSON_PATH" ] || [ "$(cat $DAEMON_JSON_PATH)" != "$DESIRED_DAEMON_JSON" ]; then
|
148
|
+
echo "${BLUE}Creating/updating $DAEMON_JSON_PATH with the desired content...${RESET}"
|
149
|
+
echo "$DESIRED_DAEMON_JSON" | sudo tee $DAEMON_JSON_PATH > /dev/null
|
150
|
+
sudo systemctl restart docker
|
151
|
+
echo "${GREEN}$DAEMON_JSON_PATH has been created/updated.${RESET}"
|
152
|
+
else
|
153
|
+
echo "${GREEN}$DAEMON_JSON_PATH already exists and has the correct content.${RESET}"
|
154
|
+
fi
|
155
|
+
|
156
|
+
# Install additional packages
|
157
|
+
for PACKAGE in $PACKAGES; do
|
158
|
+
if ! dpkg -l | grep -qw "$PACKAGE"; then
|
159
|
+
echo "${CYAN}$PACKAGE${RESET} ${BLUE}is not installed. Installing $PACKAGE...${RESET}"
|
160
|
+
sudo apt-get install -y $PACKAGE
|
161
|
+
else
|
162
|
+
echo "${GREEN}$PACKAGE${RESET} is already installed: ${GREEN}OK!${RESET}"
|
163
|
+
fi
|
164
|
+
done
|
@@ -1,22 +1,22 @@
|
|
1
|
-
CONTAINER_NAME="depth-anything-v2"
|
2
|
-
IMAGE_NAME="yaohui1998/depthanything-v2-on-jetson-orin:latest"
|
3
|
-
|
4
|
-
# Pull the latest image
|
5
|
-
docker pull $IMAGE_NAME
|
6
|
-
|
7
|
-
# Check if the container with the specified name already exists
|
8
|
-
if [ $(docker ps -a -q -f name=^/${CONTAINER_NAME}$) ]; then
|
9
|
-
echo "Container $CONTAINER_NAME already exists. Starting and attaching..."
|
10
|
-
docker start $CONTAINER_NAME
|
11
|
-
else
|
12
|
-
echo "Container $CONTAINER_NAME does not exist. Creating and starting..."
|
13
|
-
docker run -it \
|
14
|
-
--name $CONTAINER_NAME \
|
15
|
-
--privileged \
|
16
|
-
--network host \
|
17
|
-
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
18
|
-
-v /dev/*:/dev/* \
|
19
|
-
-v /etc/localtime:/etc/localtime:ro \
|
20
|
-
--runtime nvidia \
|
21
|
-
$IMAGE_NAME
|
22
|
-
fi
|
1
|
+
CONTAINER_NAME="depth-anything-v2"
|
2
|
+
IMAGE_NAME="yaohui1998/depthanything-v2-on-jetson-orin:latest"
|
3
|
+
|
4
|
+
# Pull the latest image
|
5
|
+
docker pull $IMAGE_NAME
|
6
|
+
|
7
|
+
# Check if the container with the specified name already exists
|
8
|
+
if [ $(docker ps -a -q -f name=^/${CONTAINER_NAME}$) ]; then
|
9
|
+
echo "Container $CONTAINER_NAME already exists. Starting and attaching..."
|
10
|
+
docker start $CONTAINER_NAME
|
11
|
+
else
|
12
|
+
echo "Container $CONTAINER_NAME does not exist. Creating and starting..."
|
13
|
+
docker run -it \
|
14
|
+
--name $CONTAINER_NAME \
|
15
|
+
--privileged \
|
16
|
+
--network host \
|
17
|
+
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
18
|
+
-v /dev/*:/dev/* \
|
19
|
+
-v /etc/localtime:/etc/localtime:ro \
|
20
|
+
--runtime nvidia \
|
21
|
+
$IMAGE_NAME
|
22
|
+
fi
|
@@ -1,16 +1,16 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
|
4
|
-
BASE_PATH=/home/$USER/reComputer
|
5
|
-
mkdir -p $BASE_PATH/
|
6
|
-
JETSON_REPO_PATH="$BASE_PATH/jetson-containers"
|
7
|
-
BASE_JETSON_LAB_GIT="https://github.com/dusty-nv/jetson-containers"
|
8
|
-
if [ -d $JETSON_REPO_PATH ]; then
|
9
|
-
echo "jetson-ai-lab existed."
|
10
|
-
else
|
11
|
-
echo "jetson-ai-lab does not installed. start init..."
|
12
|
-
cd $BASE_PATH/
|
13
|
-
git clone --depth=1 $BASE_JETSON_LAB_GIT
|
14
|
-
cd $JETSON_REPO_PATH
|
15
|
-
bash install.sh
|
16
|
-
fi
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
|
4
|
+
BASE_PATH=/home/$USER/reComputer
|
5
|
+
mkdir -p $BASE_PATH/
|
6
|
+
JETSON_REPO_PATH="$BASE_PATH/jetson-containers"
|
7
|
+
BASE_JETSON_LAB_GIT="https://github.com/dusty-nv/jetson-containers"
|
8
|
+
if [ -d $JETSON_REPO_PATH ]; then
|
9
|
+
echo "jetson-ai-lab existed."
|
10
|
+
else
|
11
|
+
echo "jetson-ai-lab does not installed. start init..."
|
12
|
+
cd $BASE_PATH/
|
13
|
+
git clone --depth=1 $BASE_JETSON_LAB_GIT
|
14
|
+
cd $JETSON_REPO_PATH
|
15
|
+
bash install.sh
|
16
|
+
fi
|