23 línte
512 B
Bash
Comhad Infheidhmithe
23 línte
512 B
Bash
Comhad Infheidhmithe
#!/usr/bin/env bash
|
|
### Build the chatterbox image. USAGE: ./build-container.sh [cpu|rocm] (default: cpu)
|
|
set -euo pipefail
|
|
|
|
DEVICE="${1:-cpu}"
|
|
|
|
case "$DEVICE" in
|
|
cpu|rocm) ;;
|
|
*)
|
|
echo "Usage: $0 [cpu|rocm]" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
podman build \
|
|
--build-arg DEVICE="$DEVICE" \
|
|
-t "localhost/chatterbox:$DEVICE" \
|
|
-t localhost/chatterbox:latest \
|
|
-f "$SCRIPT_DIR/chatterbox.Containerfile" \
|
|
"$SCRIPT_DIR"
|