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,26 +1,26 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
CONTAINER_NAME="ultralytics-yolo"
|
4
|
-
IMAGE_NAME="yaohui1998/ultralytics-yolo:latest"
|
5
|
-
|
6
|
-
# Pull the latest image
|
7
|
-
docker pull $IMAGE_NAME
|
8
|
-
|
9
|
-
# Check if the container with the specified name already exists
|
10
|
-
if [ $(docker ps -a -q -f name=^/${CONTAINER_NAME}$) ]; then
|
11
|
-
echo "Container $CONTAINER_NAME already exists. Starting and attaching..."
|
12
|
-
echo "Please open http://127.0.0.1:5001 to access the WebUI."
|
13
|
-
docker start $CONTAINER_NAME
|
14
|
-
docker exec -it $CONTAINER_NAME /bin/bash
|
15
|
-
else
|
16
|
-
echo "Container $CONTAINER_NAME does not exist. Creating and starting..."
|
17
|
-
docker run -it \
|
18
|
-
--name $CONTAINER_NAME \
|
19
|
-
--privileged \
|
20
|
-
--network host \
|
21
|
-
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
22
|
-
-v /dev/*:/dev/* \
|
23
|
-
-v /etc/localtime:/etc/localtime:ro \
|
24
|
-
--runtime nvidia \
|
25
|
-
$IMAGE_NAME
|
26
|
-
fi
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
CONTAINER_NAME="ultralytics-yolo"
|
4
|
+
IMAGE_NAME="yaohui1998/ultralytics-yolo:latest"
|
5
|
+
|
6
|
+
# Pull the latest image
|
7
|
+
docker pull $IMAGE_NAME
|
8
|
+
|
9
|
+
# Check if the container with the specified name already exists
|
10
|
+
if [ $(docker ps -a -q -f name=^/${CONTAINER_NAME}$) ]; then
|
11
|
+
echo "Container $CONTAINER_NAME already exists. Starting and attaching..."
|
12
|
+
echo "Please open http://127.0.0.1:5001 to access the WebUI."
|
13
|
+
docker start $CONTAINER_NAME
|
14
|
+
docker exec -it $CONTAINER_NAME /bin/bash
|
15
|
+
else
|
16
|
+
echo "Container $CONTAINER_NAME does not exist. Creating and starting..."
|
17
|
+
docker run -it \
|
18
|
+
--name $CONTAINER_NAME \
|
19
|
+
--privileged \
|
20
|
+
--network host \
|
21
|
+
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
22
|
+
-v /dev/*:/dev/* \
|
23
|
+
-v /etc/localtime:/etc/localtime:ro \
|
24
|
+
--runtime nvidia \
|
25
|
+
$IMAGE_NAME
|
26
|
+
fi
|
reComputer/scripts/update.sh
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
echo "--update jetson-containers repo--"
|
3
|
-
BASE_PATH=/home/$USER/reComputer
|
4
|
-
mkdir -p $BASE_PATH/
|
5
|
-
|
6
|
-
JETSON_REPO_PATH="$BASE_PATH/jetson-containers"
|
7
|
-
BASE_JETSON_LAB_GIT="https://github.com/dusty-nv/jetson-containers/tree/d1573a3e8d7ba3fef36ebb23a7391e60eaf64db7"
|
8
|
-
|
9
|
-
if [ -d $JETSON_REPO_PATH ]; then
|
10
|
-
echo "jetson-ai-lab existed."
|
11
|
-
# 5 publish to Test PyPI
|
12
|
-
read -p "follow the newest version maybe bring bugs, are you sure about the update? (y/n): " choice
|
13
|
-
if [[ $choice == "y" || $choice == "Y" ]]; then
|
14
|
-
cd $JETSON_REPO_PATH
|
15
|
-
git pull
|
16
|
-
pip3 install -r requirements.txt
|
17
|
-
else
|
18
|
-
echo "skip update."
|
19
|
-
fi
|
20
|
-
else
|
21
|
-
echo "jetson-ai-lab does not installed. start init..."
|
22
|
-
cd $BASE_PATH/
|
23
|
-
git clone --depth=1 $BASE_JETSON_LAB_GIT
|
24
|
-
cd $JETSON_REPO_PATH
|
25
|
-
sudo apt update; sudo apt install -y python3-pip
|
26
|
-
pip3 install -r requirements.txt
|
1
|
+
#!/bin/bash
|
2
|
+
echo "--update jetson-containers repo--"
|
3
|
+
BASE_PATH=/home/$USER/reComputer
|
4
|
+
mkdir -p $BASE_PATH/
|
5
|
+
|
6
|
+
JETSON_REPO_PATH="$BASE_PATH/jetson-containers"
|
7
|
+
BASE_JETSON_LAB_GIT="https://github.com/dusty-nv/jetson-containers/tree/d1573a3e8d7ba3fef36ebb23a7391e60eaf64db7"
|
8
|
+
|
9
|
+
if [ -d $JETSON_REPO_PATH ]; then
|
10
|
+
echo "jetson-ai-lab existed."
|
11
|
+
# 5 publish to Test PyPI
|
12
|
+
read -p "follow the newest version maybe bring bugs, are you sure about the update? (y/n): " choice
|
13
|
+
if [[ $choice == "y" || $choice == "Y" ]]; then
|
14
|
+
cd $JETSON_REPO_PATH
|
15
|
+
git pull
|
16
|
+
pip3 install -r requirements.txt
|
17
|
+
else
|
18
|
+
echo "skip update."
|
19
|
+
fi
|
20
|
+
else
|
21
|
+
echo "jetson-ai-lab does not installed. start init..."
|
22
|
+
cd $BASE_PATH/
|
23
|
+
git clone --depth=1 $BASE_JETSON_LAB_GIT
|
24
|
+
cd $JETSON_REPO_PATH
|
25
|
+
sudo apt update; sudo apt install -y python3-pip
|
26
|
+
pip3 install -r requirements.txt
|
27
27
|
fi
|
reComputer/scripts/utils.sh
CHANGED
@@ -1,166 +1,168 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
check_base_env()
|
4
|
-
{
|
5
|
-
# 1. Set color value
|
6
|
-
RED=$(tput setaf 1)
|
7
|
-
GREEN=$(tput setaf 2)
|
8
|
-
YELLOW=$(tput setaf 3)
|
9
|
-
BLUE=$(tput setaf 4)
|
10
|
-
MAGENTA=$(tput setaf 5)
|
11
|
-
CYAN=$(tput setaf 6)
|
12
|
-
RESET=$(tput sgr0)
|
13
|
-
|
14
|
-
# 2. Load config file
|
15
|
-
local CONFIG_FILE=$1
|
16
|
-
echo "CONFIG_FILE_PATH=$CONFIG_FILE"
|
17
|
-
|
18
|
-
if [[ ! -f "$CONFIG_FILE" ]]; then
|
19
|
-
echo "Error: YAML file '$CONFIG_FILE' not found."
|
20
|
-
return 1
|
21
|
-
fi
|
22
|
-
# Install yq for parsing YAML file
|
23
|
-
if ! command -v yq &> /dev/null
|
24
|
-
then
|
25
|
-
echo "yq is not installed. Installing yq with pip3..."
|
26
|
-
pip3 install yq
|
27
|
-
if command -v yq &> /dev/null
|
28
|
-
then
|
29
|
-
echo "yq has been successfully installed."
|
30
|
-
else
|
31
|
-
echo "Failed to install yq."
|
32
|
-
exit 1
|
33
|
-
fi
|
34
|
-
else
|
35
|
-
echo "yq is already installed."
|
36
|
-
fi
|
37
|
-
|
38
|
-
if ! command -v jq &> /dev/null
|
39
|
-
then
|
40
|
-
echo "jq is not installed. Installing jq..."
|
41
|
-
sudo apt-get update
|
42
|
-
sudo apt-get install -y jq
|
43
|
-
|
44
|
-
if command -v jq &> /dev/null
|
45
|
-
then
|
46
|
-
echo "jq has been successfully installed."
|
47
|
-
jq --version
|
48
|
-
else
|
49
|
-
echo "Failed to install jq."
|
50
|
-
exit 1
|
51
|
-
fi
|
52
|
-
else
|
53
|
-
echo "jq is already installed."
|
54
|
-
jq --version
|
55
|
-
fi
|
56
|
-
ALLOWED_L4T_VERSIONS=($(yq -r '.ALLOWED_L4T_VERSIONS[]' $CONFIG_FILE))
|
57
|
-
REQUIRED_DISK_SPACE=$(yq -r '.REQUIRED_DISK_SPACE' $CONFIG_FILE)
|
58
|
-
REQUIRED_MEM_SPACE=$(yq -r '.REQUIRED_MEM_SPACE' $CONFIG_FILE)
|
59
|
-
PACKAGES=($(yq -r '.PACKAGES[]' $CONFIG_FILE))
|
60
|
-
DOCKER=$(yq -r '.DOCKER.ENABLE' $CONFIG_FILE)
|
61
|
-
DESIRED_DAEMON_JSON=$(yq -r '.DOCKER.DAEMON' $CONFIG_FILE)
|
62
|
-
|
63
|
-
# 3. Check L4T version
|
64
|
-
ARCH=$(uname -i)
|
65
|
-
if [ "$ARCH" = "aarch64" ]; then
|
66
|
-
# Check for L4T version string
|
67
|
-
L4T_VERSION_STRING=$(head -n 1 /etc/nv_tegra_release)
|
68
|
-
|
69
|
-
if [ -z "$L4T_VERSION_STRING" ]; then
|
70
|
-
L4T_VERSION_STRING=$(dpkg-query --showformat='${Version}' --show nvidia-l4t-core)
|
71
|
-
fi
|
72
|
-
|
73
|
-
L4T_RELEASE=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ' ' | grep -Po '(?<=R)[^;]+')
|
74
|
-
L4T_REVISION=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ',' | grep -Po '(?<=REVISION: )[^;]+')
|
75
|
-
L4T_VERSION="$L4T_RELEASE.$L4T_REVISION"
|
76
|
-
|
77
|
-
elif [ "$ARCH" = "x86_64" ]; then
|
78
|
-
echo "${RED}Unsupported architecture: $ARCH${RESET}"
|
79
|
-
exit 1
|
80
|
-
fi
|
81
|
-
|
82
|
-
if [[ " ${ALLOWED_L4T_VERSIONS[@]} " =~ " ${L4T_VERSION} " ]]; then
|
83
|
-
echo "L4T VERSION ${GREEN}${L4T_VERSION}${RESET} is in the allowed: ${GREEN}OK!${RESET}"
|
84
|
-
else
|
85
|
-
echo "${RED}L4T VERSION ${GREEN}${L4T_VERSION}${RESET}${RED} is not in the allowed versions list.${RESET}"
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
sudo
|
124
|
-
|
125
|
-
sudo apt-
|
126
|
-
|
127
|
-
sudo
|
128
|
-
sudo
|
129
|
-
sudo
|
130
|
-
sudo systemctl
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
echo "$
|
142
|
-
|
143
|
-
echo "${
|
144
|
-
|
145
|
-
echo "${
|
146
|
-
|
147
|
-
echo "$
|
148
|
-
|
149
|
-
echo "$
|
150
|
-
|
151
|
-
echo "${GREEN}$DAEMON_JSON_PATH
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
check_base_env()
|
4
|
+
{
|
5
|
+
# 1. Set color value
|
6
|
+
RED=$(tput setaf 1)
|
7
|
+
GREEN=$(tput setaf 2)
|
8
|
+
YELLOW=$(tput setaf 3)
|
9
|
+
BLUE=$(tput setaf 4)
|
10
|
+
MAGENTA=$(tput setaf 5)
|
11
|
+
CYAN=$(tput setaf 6)
|
12
|
+
RESET=$(tput sgr0)
|
13
|
+
|
14
|
+
# 2. Load config file
|
15
|
+
local CONFIG_FILE=$1
|
16
|
+
echo "CONFIG_FILE_PATH=$CONFIG_FILE"
|
17
|
+
|
18
|
+
if [[ ! -f "$CONFIG_FILE" ]]; then
|
19
|
+
echo "Error: YAML file '$CONFIG_FILE' not found."
|
20
|
+
return 1
|
21
|
+
fi
|
22
|
+
# Install yq for parsing YAML file
|
23
|
+
if ! command -v yq &> /dev/null
|
24
|
+
then
|
25
|
+
echo "yq is not installed. Installing yq with pip3..."
|
26
|
+
pip3 install yq
|
27
|
+
if command -v yq &> /dev/null
|
28
|
+
then
|
29
|
+
echo "yq has been successfully installed."
|
30
|
+
else
|
31
|
+
echo "Failed to install yq."
|
32
|
+
exit 1
|
33
|
+
fi
|
34
|
+
else
|
35
|
+
echo "yq is already installed."
|
36
|
+
fi
|
37
|
+
|
38
|
+
if ! command -v jq &> /dev/null
|
39
|
+
then
|
40
|
+
echo "jq is not installed. Installing jq..."
|
41
|
+
sudo apt-get update
|
42
|
+
sudo apt-get install -y jq
|
43
|
+
|
44
|
+
if command -v jq &> /dev/null
|
45
|
+
then
|
46
|
+
echo "jq has been successfully installed."
|
47
|
+
jq --version
|
48
|
+
else
|
49
|
+
echo "Failed to install jq."
|
50
|
+
exit 1
|
51
|
+
fi
|
52
|
+
else
|
53
|
+
echo "jq is already installed."
|
54
|
+
jq --version
|
55
|
+
fi
|
56
|
+
ALLOWED_L4T_VERSIONS=($(yq -r '.ALLOWED_L4T_VERSIONS[]' $CONFIG_FILE))
|
57
|
+
REQUIRED_DISK_SPACE=$(yq -r '.REQUIRED_DISK_SPACE' $CONFIG_FILE)
|
58
|
+
REQUIRED_MEM_SPACE=$(yq -r '.REQUIRED_MEM_SPACE' $CONFIG_FILE)
|
59
|
+
PACKAGES=($(yq -r '.PACKAGES[]' $CONFIG_FILE))
|
60
|
+
DOCKER=$(yq -r '.DOCKER.ENABLE' $CONFIG_FILE)
|
61
|
+
DESIRED_DAEMON_JSON=$(yq -r '.DOCKER.DAEMON' $CONFIG_FILE)
|
62
|
+
echo "${ALLOWED_L4T_VERSIONS[@]}"
|
63
|
+
# 3. Check L4T version
|
64
|
+
ARCH=$(uname -i)
|
65
|
+
if [ "$ARCH" = "aarch64" ]; then
|
66
|
+
# Check for L4T version string
|
67
|
+
L4T_VERSION_STRING=$(head -n 1 /etc/nv_tegra_release)
|
68
|
+
|
69
|
+
if [ -z "$L4T_VERSION_STRING" ]; then
|
70
|
+
L4T_VERSION_STRING=$(dpkg-query --showformat='${Version}' --show nvidia-l4t-core)
|
71
|
+
fi
|
72
|
+
|
73
|
+
L4T_RELEASE=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ' ' | grep -Po '(?<=R)[^;]+')
|
74
|
+
L4T_REVISION=$(echo "$L4T_VERSION_STRING" | cut -f 2 -d ',' | grep -Po '(?<=REVISION: )[^;]+')
|
75
|
+
L4T_VERSION="$L4T_RELEASE.$L4T_REVISION"
|
76
|
+
|
77
|
+
elif [ "$ARCH" = "x86_64" ]; then
|
78
|
+
echo "${RED}Unsupported architecture: $ARCH${RESET}"
|
79
|
+
exit 1
|
80
|
+
fi
|
81
|
+
|
82
|
+
if [[ " ${ALLOWED_L4T_VERSIONS[@]} " =~ " ${L4T_VERSION} " ]]; then
|
83
|
+
echo "L4T VERSION ${GREEN}${L4T_VERSION}${RESET} is in the allowed: ${GREEN}OK!${RESET}"
|
84
|
+
else
|
85
|
+
echo "${RED}L4T VERSION ${GREEN}${L4T_VERSION}${RESET}${RED} is not in the allowed versions list.${RESET}"
|
86
|
+
echo "${RED}The JetPack versions currently supported by this container are: ${GREEN}${ALLOWED_L4T_VERSIONS[@]}${RESET}${RED}. ${RESET}"
|
87
|
+
echo "${RED}For more information : https://github.com/Seeed-Projects/jetson-examples ${RESET}"
|
88
|
+
exit 1
|
89
|
+
fi
|
90
|
+
|
91
|
+
# Install additional apt packages
|
92
|
+
for PACKAGE in $PACKAGES; do
|
93
|
+
if ! dpkg -l | grep -qw "$PACKAGE"; then
|
94
|
+
echo "Installing $PACKAGE..."
|
95
|
+
sudo apt-get install -y $PACKAGE
|
96
|
+
fi
|
97
|
+
echo "$PACKAGE is installed: ${GREEN}OK!${RESET}"
|
98
|
+
done
|
99
|
+
|
100
|
+
# 4. Check disk space
|
101
|
+
CURRENT_DISK_SPACE=$(df -BG --output=avail / | tail -1 | sed 's/[^0-9]*//g')
|
102
|
+
if [ "$CURRENT_DISK_SPACE" -lt "$REQUIRED_DISK_SPACE" ]; then
|
103
|
+
echo "${RED}Insufficient disk space. Required: ${REQUIRED_DISK_SPACE}G, Available: ${CURRENT_DISK_SPACE}G. ${RESET}"
|
104
|
+
exit 1
|
105
|
+
else
|
106
|
+
echo "Required ${GREEN}${REQUIRED_DISK_SPACE}GB${RESET}/${GREEN}${CURRENT_DISK_SPACE}GB${RESET} disk space: ${GREEN}OK!${RESET}"
|
107
|
+
fi
|
108
|
+
|
109
|
+
# 5. Check memory space
|
110
|
+
CURRENT_MEM_SPACE=$(free -g | awk '/^Mem:/{print $2}')
|
111
|
+
if [ "$CURRENT_MEM_SPACE" -lt "$REQUIRED_MEM_SPACE" ]; then
|
112
|
+
echo "${RED}Insufficient memory: $CURRENT_MEM_SPACE GB (minimum required: $REQUIRED_MEM_SPACE GB).${RESET}"
|
113
|
+
exit 1
|
114
|
+
else
|
115
|
+
echo "Required ${GREEN}${REQUIRED_MEM_SPACE}GB${RESET}/${GREEN}${CURRENT_MEM_SPACE}GB${RESET} memory space: ${GREEN}OK!${RESET}"
|
116
|
+
fi
|
117
|
+
|
118
|
+
# 6. Prepare Docker env
|
119
|
+
if [ "$DOCKER" = "true" ]; then
|
120
|
+
# 6.1 Check if Docker is installed
|
121
|
+
if ! command -v docker &> /dev/null; then
|
122
|
+
echo "${BLUE}Docker is not installed. Installing Docker...${RESET}"
|
123
|
+
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
|
124
|
+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
125
|
+
sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
126
|
+
|
127
|
+
sudo apt-get update
|
128
|
+
sudo apt-get install -y docker-ce
|
129
|
+
sudo systemctl enable docker
|
130
|
+
sudo systemctl start docker
|
131
|
+
sudo usermod -aG docker $USER
|
132
|
+
sudo systemctl restart docker
|
133
|
+
newgrp docker
|
134
|
+
|
135
|
+
echo "Docker has been installed and configured."
|
136
|
+
fi
|
137
|
+
# 6.2 Modify the Docker configuration file
|
138
|
+
DAEMON_JSON_PATH="/etc/docker/daemon.json"
|
139
|
+
if [ ! -f "$DAEMON_JSON_PATH" ]; then
|
140
|
+
echo "${BLUE}Creating $DAEMON_JSON_PATH with the desired content...${RESET}"
|
141
|
+
echo "$DESIRED_DAEMON_JSON" | sudo tee $DAEMON_JSON_PATH > /dev/null
|
142
|
+
sudo systemctl restart docker
|
143
|
+
echo "${GREEN}$DAEMON_JSON_PATH has been created.${RESET}"
|
144
|
+
elif [ "$(cat $DAEMON_JSON_PATH)" != "$DESIRED_DAEMON_JSON" ]; then
|
145
|
+
echo "${BLUE}Backing up the existing $DAEMON_JSON_PATH to /etc/docker/daemon_backup.json ...${RESET}"
|
146
|
+
sudo cp "$DAEMON_JSON_PATH" "/etc/docker/daemon_backup.json"
|
147
|
+
echo "${GREEN}Backup completed.${RESET}"
|
148
|
+
echo "${BLUE}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 updated.${RESET}"
|
152
|
+
else
|
153
|
+
echo "${GREEN}$DAEMON_JSON_PATH already exists and has the correct content.${RESET}"
|
154
|
+
fi
|
155
|
+
# 6.3 Check permissions
|
156
|
+
if ! docker info &> /dev/null; then
|
157
|
+
echo "The current user does not have permissions to use Docker. Adding permissions..."
|
158
|
+
sudo usermod -aG docker $USER
|
159
|
+
sudo systemctl restart docker
|
160
|
+
echo "${BLUE}Permissions added. Please rerun the command.${RESET}"
|
161
|
+
newgrp docker
|
162
|
+
else
|
163
|
+
echo "${GREEN}Docker is installed and the current user has permissions to use it.${RESET}"
|
164
|
+
fi
|
165
|
+
else
|
166
|
+
echo "No need to configure Docker."
|
167
|
+
fi
|
168
|
+
}
|
@@ -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
|
@@ -1,7 +1,7 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
BASE_PATH=/home/$USER/reComputer
|
4
|
-
JETSON_REPO_PATH="$BASE_PATH/jetson-containers"
|
5
|
-
cd $JETSON_REPO_PATH
|
6
|
-
|
7
|
-
./run.sh $(./autotag whisper)
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
BASE_PATH=/home/$USER/reComputer
|
4
|
+
JETSON_REPO_PATH="$BASE_PATH/jetson-containers"
|
5
|
+
cd $JETSON_REPO_PATH
|
6
|
+
|
7
|
+
./run.sh $(./autotag whisper)
|
@@ -1,14 +1,14 @@
|
|
1
|
-
FROM dustynv/l4t-pytorch:r35.3.1
|
2
|
-
WORKDIR /opt
|
3
|
-
|
4
|
-
RUN pip3 install --no-cache-dir --verbose gradio==4.31.5
|
5
|
-
|
6
|
-
RUN git clone https://github.com/THU-MIG/yolov10.git && \
|
7
|
-
cd yolov10 && \
|
8
|
-
sed -i '/opencv-python>=4.6.0/ s/^/# /' pyproject.toml && \
|
9
|
-
sed -i '/torch>=1.8.0/ s/^/# /' pyproject.toml && \
|
10
|
-
sed -i '/torchvision>=0.9.0/ s/^/# /' pyproject.toml && \
|
11
|
-
pip3 install -e . && \
|
12
|
-
mkdir weights
|
13
|
-
|
1
|
+
FROM dustynv/l4t-pytorch:r35.3.1
|
2
|
+
WORKDIR /opt
|
3
|
+
|
4
|
+
RUN pip3 install --no-cache-dir --verbose gradio==4.31.5
|
5
|
+
|
6
|
+
RUN git clone https://github.com/THU-MIG/yolov10.git && \
|
7
|
+
cd yolov10 && \
|
8
|
+
sed -i '/opencv-python>=4.6.0/ s/^/# /' pyproject.toml && \
|
9
|
+
sed -i '/torch>=1.8.0/ s/^/# /' pyproject.toml && \
|
10
|
+
sed -i '/torchvision>=0.9.0/ s/^/# /' pyproject.toml && \
|
11
|
+
pip3 install -e . && \
|
12
|
+
mkdir weights
|
13
|
+
|
14
14
|
CMD cd /opt/yolov10 && ls weights && python3 app.py
|