document_redaction / agent-redact /agentcore /Dockerfile.runtime
seanpedrickcase's picture
Sync: fix on agent task download links with root path
b5355b0
Raw
History Blame Contribute Delete
1.37 kB
# syntax=docker/dockerfile:1
# Bedrock AgentCore Runtime image (linux/arm64). Build from monorepo root:
# docker build --platform linux/arm64 -f agent-redact/agentcore/Dockerfile.runtime .
#
# AgentCore requires arm64, port 8080, POST /invocations and GET /ping
# (provided by BedrockAgentCoreApp in entrypoint.py).
FROM --platform=linux/arm64 public.ecr.aws/docker/library/python:3.12.13-slim-trixie
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV APP_TYPE=agent
ENV APP_HOME=/app
ENV PYTHONPATH=${APP_HOME}:${APP_HOME}/agent-redact:${APP_HOME}/agent-redact/pi:${APP_HOME}/agent-redact/agentcore
ENV AGENT_WORKSPACE_DIR=/tmp/agentcore-workspace
ENV AWS_REGION=eu-west-2
ENV AWS_DEFAULT_REGION=${AWS_REGION}
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR ${APP_HOME}
COPY agent-redact/requirements_pi_agent.txt /tmp/requirements_pi_agent.txt
RUN pip install --no-cache-dir -r /tmp/requirements_pi_agent.txt \
&& rm /tmp/requirements_pi_agent.txt
COPY agent-redact/ ${APP_HOME}/agent-redact/
COPY config/agent.env.example ${APP_HOME}/config/agent.env.example
RUN mkdir -p /tmp/agentcore-workspace \
&& chmod 1777 /tmp/agentcore-workspace
EXPOSE 8080
CMD ["python", "agent-redact/agentcore/entrypoint.py"]