forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jetson-containers
executable file
·40 lines (38 loc) · 1.05 KB
/
jetson-containers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# Launcher for jetson-containers build.sh, run.sh, and autotag
ROOT="$(dirname "$(readlink -f "$0")")"
COMMAND=$1
shift;
if [ "$COMMAND" = "build" ] || [ "$COMMAND" = "build.sh" ]; then
$ROOT/build.sh "$@"
elif [ "$COMMAND" = "run" ] || [ "$COMMAND" = "run.sh" ]; then
$ROOT/run.sh "$@"
elif [ "$COMMAND" = "list" ]; then
$ROOT/build.sh --list "$@"
elif [ "$COMMAND" = "show" ]; then
$ROOT/build.sh --show "$@"
elif [ "$COMMAND" = "autotag" ]; then
$ROOT/autotag "$@"
elif [ "$COMMAND" = "update" ]; then
cd $ROOT
git pull
elif [ "$COMMAND" = "root" ]; then
echo $ROOT
elif [ "$COMMAND" = "data" ]; then
echo $ROOT/data
else
echo ''
echo 'jetson-containers > Invalid command'
echo ''
echo ' * build [PACKAGES]'
echo ' * run OPTIONS [CONTAINER:TAG] CMD'
echo ' * list [PACKAGES|*'
echo ' * show [PACKAGES]*'
echo ' * autotag [CONTAINER]'
echo ' * update (runs git pull)'
echo ' * root (prints repo path)'
echo ' * data (prints data path)'
echo ''
echo 'Run "jetson-containers <CMD> --help" for more info.'
exit 1
fi