Skip to content

Commit

Permalink
added target option
Browse files Browse the repository at this point in the history
Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve committed Jan 14, 2025
1 parent 3be8044 commit 74b466e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ print_help() {
echo " --no-cuda Disable CUDA support"
echo " --platform Specify the platform (default: current platform)"
echo " --devel-only Build devel image only"
echo " --target Specify the target image"
echo ""
echo "Note: The --platform option should be one of 'linux/amd64' or 'linux/arm64'."
}
Expand All @@ -36,6 +37,10 @@ parse_arguments() {
--devel-only)
option_devel_only=true
;;
--target)
option_target="$2"
shift
;;
*)
echo "Unknown option: $1"
print_help
Expand All @@ -58,10 +63,14 @@ set_cuda_options() {

# Set build options
set_build_options() {
if [ "$option_devel_only" = "true" ]; then
target="universe-devel"
if [ -n "$option_target" ]; then
target="$option_target"
else
target="universe"
if [ "$option_devel_only" = "true" ]; then
target="universe-devel"
else
target="universe"
fi
fi
}

Expand Down

0 comments on commit 74b466e

Please sign in to comment.