jetson-examples 0.1.6__py3-none-any.whl → 0.1.8__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.
Files changed (128) hide show
  1. {jetson_examples-0.1.6.dist-info → jetson_examples-0.1.8.dist-info}/LICENSE +21 -21
  2. {jetson_examples-0.1.6.dist-info → jetson_examples-0.1.8.dist-info}/METADATA +8 -8
  3. jetson_examples-0.1.8.dist-info/RECORD +107 -0
  4. {jetson_examples-0.1.6.dist-info → jetson_examples-0.1.8.dist-info}/WHEEL +1 -1
  5. reComputer/__init__.py +1 -1
  6. reComputer/main.py +60 -60
  7. reComputer/scripts/MoveNet-Lightning/clean.sh +8 -8
  8. reComputer/scripts/MoveNet-Lightning/getVersion.sh +59 -59
  9. reComputer/scripts/MoveNet-Lightning/init.sh +6 -6
  10. reComputer/scripts/MoveNet-Lightning/readme.md +30 -30
  11. reComputer/scripts/MoveNet-Lightning/run.sh +19 -19
  12. reComputer/scripts/MoveNet-Thunder/clean.sh +7 -7
  13. reComputer/scripts/MoveNet-Thunder/getVersion.sh +59 -59
  14. reComputer/scripts/MoveNet-Thunder/init.sh +6 -6
  15. reComputer/scripts/MoveNet-Thunder/readme.md +31 -31
  16. reComputer/scripts/MoveNet-Thunder/run.sh +18 -18
  17. reComputer/scripts/MoveNetJS/clean.sh +4 -4
  18. reComputer/scripts/MoveNetJS/readme.md +56 -56
  19. reComputer/scripts/MoveNetJS/run.sh +13 -13
  20. reComputer/scripts/Sheared-LLaMA-2.7B-ShareGPT/init.sh +16 -16
  21. reComputer/scripts/Sheared-LLaMA-2.7B-ShareGPT/run.sh +8 -8
  22. reComputer/scripts/audiocraft/README.md +35 -35
  23. reComputer/scripts/audiocraft/clean.sh +5 -5
  24. reComputer/scripts/audiocraft/init.sh +16 -16
  25. reComputer/scripts/audiocraft/run.sh +7 -7
  26. reComputer/scripts/check.sh +4 -4
  27. reComputer/scripts/clean.sh +33 -33
  28. reComputer/scripts/comfyui/LICENSE +21 -21
  29. reComputer/scripts/comfyui/README.md +127 -127
  30. reComputer/scripts/comfyui/clean.sh +6 -6
  31. reComputer/scripts/comfyui/config.yaml +29 -29
  32. reComputer/scripts/comfyui/init.sh +163 -163
  33. reComputer/scripts/comfyui/run.sh +30 -30
  34. reComputer/scripts/depth-anything/Dockerfile +5 -5
  35. reComputer/scripts/depth-anything/LICENSE +21 -21
  36. reComputer/scripts/depth-anything/README.md +135 -135
  37. reComputer/scripts/depth-anything/clean.sh +7 -7
  38. reComputer/scripts/depth-anything/config.yaml +31 -31
  39. reComputer/scripts/depth-anything/init.sh +164 -164
  40. reComputer/scripts/depth-anything/run.sh +22 -22
  41. reComputer/scripts/depth-anything-v2/Dockerfile +5 -5
  42. reComputer/scripts/depth-anything-v2/LICENSE +21 -21
  43. reComputer/scripts/depth-anything-v2/README.md +135 -135
  44. reComputer/scripts/depth-anything-v2/clean.sh +7 -7
  45. reComputer/scripts/depth-anything-v2/config.yaml +31 -31
  46. reComputer/scripts/depth-anything-v2/init.sh +164 -164
  47. reComputer/scripts/depth-anything-v2/run.sh +22 -22
  48. reComputer/scripts/live-llava/init.sh +16 -16
  49. reComputer/scripts/live-llava/run.sh +278 -278
  50. reComputer/scripts/llama-factory/README.md +68 -68
  51. reComputer/scripts/llama-factory/clean.sh +4 -4
  52. reComputer/scripts/llama-factory/init.sh +52 -52
  53. reComputer/scripts/llama-factory/run.sh +10 -10
  54. reComputer/scripts/llama3/clean.sh +22 -22
  55. reComputer/scripts/llama3/init.sh +16 -16
  56. reComputer/scripts/llama3/run.sh +13 -13
  57. reComputer/scripts/llava/clean.sh +3 -3
  58. reComputer/scripts/llava/init.sh +16 -16
  59. reComputer/scripts/llava/run.sh +9 -9
  60. reComputer/scripts/llava-v1.5-7b/init.sh +16 -16
  61. reComputer/scripts/llava-v1.5-7b/run.sh +9 -9
  62. reComputer/scripts/llava-v1.6-vicuna-7b/init.sh +16 -16
  63. reComputer/scripts/llava-v1.6-vicuna-7b/run.sh +10 -10
  64. reComputer/scripts/nanodb/init.sh +16 -16
  65. reComputer/scripts/nanodb/readme.md +10 -10
  66. reComputer/scripts/nanodb/run.sh +90 -90
  67. reComputer/scripts/nanoowl/init.sh +16 -16
  68. reComputer/scripts/nanoowl/run.sh +7 -7
  69. reComputer/scripts/ollama/clean.sh +22 -22
  70. reComputer/scripts/ollama/init.sh +16 -16
  71. reComputer/scripts/ollama/run.sh +10 -10
  72. reComputer/scripts/parler-tts/clean.sh +7 -7
  73. reComputer/scripts/parler-tts/getVersion.sh +59 -59
  74. reComputer/scripts/parler-tts/init.sh +8 -8
  75. reComputer/scripts/parler-tts/readme.md +63 -63
  76. reComputer/scripts/parler-tts/run.sh +17 -17
  77. reComputer/scripts/run.sh +48 -48
  78. reComputer/scripts/stable-diffusion-webui/init.sh +16 -16
  79. reComputer/scripts/stable-diffusion-webui/run.sh +6 -6
  80. reComputer/scripts/text-generation-webui/init.sh +16 -16
  81. reComputer/scripts/text-generation-webui/run.sh +11 -11
  82. reComputer/scripts/ultralytics-yolo/LICENSE +21 -21
  83. reComputer/scripts/ultralytics-yolo/README.md +124 -124
  84. reComputer/scripts/ultralytics-yolo/clean.sh +6 -6
  85. reComputer/scripts/ultralytics-yolo/config.yaml +31 -32
  86. reComputer/scripts/ultralytics-yolo/init.sh +4 -163
  87. reComputer/scripts/ultralytics-yolo/run.sh +26 -25
  88. reComputer/scripts/update.sh +26 -26
  89. reComputer/scripts/utils.sh +166 -0
  90. reComputer/scripts/whisper/init.sh +16 -16
  91. reComputer/scripts/whisper/run.sh +7 -7
  92. reComputer/scripts/yolov10/Dockerfile +13 -13
  93. reComputer/scripts/yolov10/README.md +71 -71
  94. reComputer/scripts/yolov10/clean.sh +4 -4
  95. reComputer/scripts/yolov10/config.yaml +31 -0
  96. reComputer/scripts/yolov10/init.sh +20 -52
  97. reComputer/scripts/yolov10/run.sh +7 -7
  98. reComputer/scripts/yolov8-rail-inspection/config.yaml +31 -0
  99. reComputer/scripts/yolov8-rail-inspection/init.sh +5 -0
  100. reComputer/scripts/yolov8-rail-inspection/readme.md +35 -35
  101. reComputer/scripts/yolov8-rail-inspection/run.sh +21 -21
  102. jetson_examples-0.1.6.dist-info/RECORD +0 -127
  103. reComputer/scripts/MoveNet-Lightning/images/dance_movenet.gif +0 -0
  104. reComputer/scripts/MoveNet-Thunder/images/dance_movenet.gif +0 -0
  105. reComputer/scripts/MoveNetJS/images/dance.gif +0 -0
  106. reComputer/scripts/comfyui/images/comfyui.png +0 -0
  107. reComputer/scripts/depth-anything/images/Autonomous Driving.png +0 -0
  108. reComputer/scripts/depth-anything/images/Indoor Scenes.png +0 -0
  109. reComputer/scripts/depth-anything/images/Opr.png +0 -0
  110. reComputer/scripts/depth-anything/images/Security.png +0 -0
  111. reComputer/scripts/depth-anything/images/Underwater Scenes.png +0 -0
  112. reComputer/scripts/depth-anything/images/WebUI.png +0 -0
  113. reComputer/scripts/depth-anything/images/teaser.png +0 -0
  114. reComputer/scripts/depth-anything-v2/images/Autonomous Driving.png +0 -0
  115. reComputer/scripts/depth-anything-v2/images/Indoor Scenes.png +0 -0
  116. reComputer/scripts/depth-anything-v2/images/Opr.png +0 -0
  117. reComputer/scripts/depth-anything-v2/images/Security.png +0 -0
  118. reComputer/scripts/depth-anything-v2/images/Underwater Scenes.png +0 -0
  119. reComputer/scripts/depth-anything-v2/images/WebUI.png +0 -0
  120. reComputer/scripts/depth-anything-v2/images/teaser.png +0 -0
  121. reComputer/scripts/parler-tts/images/audio1.png +0 -0
  122. reComputer/scripts/parler-tts/images/audio2.png +0 -0
  123. reComputer/scripts/ultralytics-yolo/images/Ultralytics-yolo.gif +0 -0
  124. reComputer/scripts/ultralytics-yolo/images/tasks.png +0 -0
  125. reComputer/scripts/ultralytics-yolo/images/ultralytics_fig1.png +0 -0
  126. reComputer/scripts/ultralytics-yolo/images/ultralytics_fig2.png +0 -0
  127. {jetson_examples-0.1.6.dist-info → jetson_examples-0.1.8.dist-info}/entry_points.txt +0 -0
  128. {jetson_examples-0.1.6.dist-info → jetson_examples-0.1.8.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