Skip to content

Commit

Permalink
Add DOCKER_BINARY / DOCKER_OPTS to all scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwin Bharambe committed Sep 19, 2024
1 parent ca4b87a commit 9eb01dd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist
*.egg-info
dev_requirements.txt
build
.DS_Store
2 changes: 1 addition & 1 deletion llama_stack/distribution/build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ set +x
echo "You can run it with: podman run -p 8000:8000 $image_name"

echo "Checking image builds..."
podman run -it $image_name cat llamastack-build.yaml
$DOCKER_BINARY run $DOCKER_OPTS -it $image_name cat llamastack-build.yaml
5 changes: 4 additions & 1 deletion llama_stack/distribution/configure_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.

DOCKER_BINARY=${DOCKER_BINARY:-docker}
DOCKER_OPTS=${DOCKER_OPTS:-}

set -euo pipefail

error_handler() {
Expand All @@ -25,7 +28,7 @@ host_build_dir="$2"
container_build_dir="/app/builds"

set -x
podman run -it \
$DOCKER_BINARY run $DOCKER_OPTS -it \
-v $host_build_dir:$container_build_dir \
$docker_image \
llama stack configure ./llamastack-build.yaml --output-dir $container_build_dir
5 changes: 4 additions & 1 deletion llama_stack/distribution/start_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.

DOCKER_BINARY=${DOCKER_BINARY:-docker}
DOCKER_OPTS=${DOCKER_OPTS:-}

set -euo pipefail

RED='\033[0;31m'
Expand Down Expand Up @@ -34,7 +37,7 @@ port="$1"
shift

set -x
podman run -it \
$DOCKER_BINARY run $DOCKER_OPTS -it \
-p $port:$port \
-v "$yaml_config:/app/config.yaml" \
$docker_image \
Expand Down

0 comments on commit 9eb01dd

Please sign in to comment.