improve docker scripts (#23)

* Feature/support x86 64 (#22)

* [Add] support for x86_64 archtecture.

* make script executable

* [fix] apply shellcheck suggestions (to get rid of warning during runtime)

* [fix] update the image_tag to match the x86 tag

* add input detection as optional, rename scripts

---------

Co-authored-by: Austin Gregg-Smith <blooop@gmail.com>
This commit is contained in:
Balakumar Sundaralingam
2023-11-04 15:51:59 -07:00
committed by GitHub
parent ac02893dee
commit 21d434f608
12 changed files with 201 additions and 65 deletions

25
docker/build_dev_docker.sh Normal file → Executable file
View File

@@ -12,29 +12,42 @@
# This script will create a dev docker. Run this script by calling `bash build_dev_docker.sh`
# If you want to build a isaac sim docker, run this script with `bash build_dev_docker.sh isaac`
# If you want to build a isaac sim docker, run this script with `bash build_dev_docker.sh isaac_sim_2022.2.1`
# Check architecture to build:
arch=`uname -m`
echo "deprecated, use build_docker.sh instead"
image_tag="x86"
isaac_sim_version=""
input_arg="$1"
if [ $1 == "isaac_sim_2022.2.1" ]; then
if [ -z "$input_arg" ]; then
arch=$(uname -m)
echo "Argument empty, trying to build based on architecture"
if [ "$arch" == "x86_64" ]; then
input_arg="x86"
elif [ "$arch" == "arm64" ]; then
input_arg="aarch64"
elif [ "$arch" == "aarch64" ]; then
input_arg="aarch64"
fi
fi
if [ "$input_arg" == "isaac_sim_2022.2.1" ]; then
echo "Building Isaac Sim docker"
dockerfile="isaac_sim.dockerfile"
image_tag="isaac_sim_2022.2.1"
isaac_sim_version="2022.2.1"
elif [ $1 == "isaac_sim_2023.1.0" ]; then
elif [ "$input_arg" == "isaac_sim_2023.1.0" ]; then
echo "Building Isaac Sim headless docker"
dockerfile="isaac_sim.dockerfile"
image_tag="isaac_sim_2023.1.0"
isaac_sim_version="2023.1.0"
elif [ ${arch} == "x86" ]; then
elif [ "$input_arg" == "x86" ]; then
echo "Building for X86 Architecture"
dockerfile="x86.dockerfile"
image_tag="x86"
elif [ ${arch} = "aarch64" ]; then
elif [ "$input_arg" = "aarch64" ]; then
echo "Building for ARM Architecture"
dockerfile="aarch64.dockerfile"
image_tag="aarch64"