From 6b0194daf16efd65f102986520956a03b026cabb Mon Sep 17 00:00:00 2001 From: Filipi Fuchter Date: Mon, 1 Dec 2025 07:23:51 -0300 Subject: [PATCH] Improving the script to configure the bot --- .../agents/pipecat/scripts/configure.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/aws-agentcore/agents/pipecat/scripts/configure.sh b/examples/aws-agentcore/agents/pipecat/scripts/configure.sh index cbd70d9da..8b95d5ec3 100755 --- a/examples/aws-agentcore/agents/pipecat/scripts/configure.sh +++ b/examples/aws-agentcore/agents/pipecat/scripts/configure.sh @@ -1,23 +1,30 @@ #!/bin/bash -# Script to configure the bot and add the extra dependencies +# Script to configure the bot, patch Dockerfile and sync AGENT_RUNTIME_ARN + DOCKERFILE=".bedrock_agentcore/pipecat_agent/Dockerfile" TARGET_LINE="RUN uv pip install -r requirements.txt" # Extra dependencies needed by SmallWebRTC INSERT_LINE="RUN apt update && apt install -y libgl1 libglib2.0-0 && apt clean" +############################################### +# STEP 1 — Configure agentcore # Already configuring to use Docker as it is required by Pipecat +############################################### agentcore configure -e pipecat-agent.py --deployment-type container --container-runtime docker -# Wait until the Dockerfile exists and is non-empty +############################################### +# STEP 2 — Wait until Dockerfile exists +############################################### while [ ! -s "$DOCKERFILE" ]; do sleep 0.2 done -# Create backup +############################################### +# STEP 3 — Patch Dockerfile +############################################### cp "$DOCKERFILE" "$DOCKERFILE.bak" -# Insert the line after the target awk -v target="$TARGET_LINE" -v insert="$INSERT_LINE" ' { print $0