Skip to content

Commit 2d688b7

Browse files
committed
fix: Add auto-discovery for jetson-containers and L4T 36.4.x mappings
- Auto-detect jetson-containers in common locations - Add L4T 36.4.3 and 36.4.4 to JetPack version mappings - Update BASE_PATH configuration for better compatibility
1 parent 1f909fc commit 2d688b7

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

reComputer/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from pathlib import Path
1111

1212
DEFAULT_CONFIG = {
13-
"BASE_PATH": os.path.expanduser("~/reComputer"),
13+
"BASE_PATH": os.path.expanduser("~/git"), # Use git directory as base
1414
"JETSON_REPO_PATH": None, # Will be set based on BASE_PATH
1515
"AUTO_UPDATE": True,
1616
"DEFAULT_DOCKER_RUNTIME": "nvidia",

reComputer/scripts/run.sh

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,59 @@ check_disk_space() {
6262
check_is_jetson_or_not
6363

6464
echo "run example:$1"
65-
BASE_PATH=/home/$USER/reComputer
6665

66+
# Use environment variables if set, otherwise use defaults
67+
BASE_PATH=${BASE_PATH:-/home/$USER/reComputer}
68+
JETSON_REPO_PATH=${JETSON_REPO_PATH:-$BASE_PATH/jetson-containers}
6769

6870
script_dir=$(dirname "$0")
6971

7072
# Check disk space before proceeding
7173
check_disk_space "$1"
7274

75+
# Check if jetson-containers exists
76+
if [ ! -d "$JETSON_REPO_PATH" ]; then
77+
echo "ERROR: jetson-containers not found at $JETSON_REPO_PATH"
78+
echo ""
79+
echo "Searching for existing jetson-containers installation..."
80+
81+
# Search for jetson-containers in common locations
82+
SEARCH_PATHS=(
83+
"/home/$USER/git/jetson-containers"
84+
"/home/$USER/jetson-containers"
85+
"/opt/jetson-containers"
86+
"$HOME/reComputer/jetson-containers"
87+
)
88+
89+
FOUND_PATH=""
90+
for search_path in "${SEARCH_PATHS[@]}"; do
91+
if [ -d "$search_path" ]; then
92+
echo "Found jetson-containers at: $search_path"
93+
FOUND_PATH="$search_path"
94+
break
95+
fi
96+
done
97+
98+
if [ -n "$FOUND_PATH" ]; then
99+
JETSON_REPO_PATH="$FOUND_PATH"
100+
echo "Using found path: $JETSON_REPO_PATH"
101+
echo ""
102+
echo "To make this permanent, run:"
103+
echo " reComputer config set JETSON_REPO_PATH $FOUND_PATH"
104+
echo ""
105+
else
106+
echo "jetson-containers not found in common locations."
107+
echo ""
108+
echo "Please install jetson-containers by running:"
109+
echo " reComputer update"
110+
echo ""
111+
echo "Or manually clone it:"
112+
echo " git clone https://github.com/dusty-nv/jetson-containers.git"
113+
echo " reComputer config set JETSON_REPO_PATH /path/to/jetson-containers"
114+
exit 1
115+
fi
116+
fi
117+
73118
cd $JETSON_REPO_PATH
74119

75120
init_script=$script_dir/$1/init.sh

reComputer/scripts/setup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ detect_jetpack_version() {
5656
"36.2.0") JETPACK_VERSION="6.0 DP" ;;
5757
"36.3.0") JETPACK_VERSION="6.0" ;;
5858
"36.4.0") JETPACK_VERSION="6.1" ;;
59+
"36.4.3") JETPACK_VERSION="6.2" ;;
60+
"36.4.4") JETPACK_VERSION="6.2.1" ;;
5961
*) JETPACK_VERSION="Unknown" ;;
6062
esac
6163
echo "${GREEN}✓ JetPack Version: $JETPACK_VERSION${RESET}"

0 commit comments

Comments
 (0)