Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile.agentcore-runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 5-Agent 리포트 생성 Graph를 AgentCore Runtime으로 호스팅하는 이미지.
# report_generation.deployment:agentcore_entrypoint가 하는 일(Strands Graph
# 실행, RDS 조회, Bedrock 호출, AgentCore Gateway 경유 검색)은 KURE 임베딩
# 모델이 필요 없으므로 cpu-worker(Dockerfile.cpu)의 무거운 ML extra(torch,
# sentence-transformers 등)는 설치하지 않는다 - base 의존성만으로 충분하다.
FROM python:3.11-slim

COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

WORKDIR /app

COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev

COPY app ./app

ENV PYTHONPATH=/app
ENV PATH="/app/.venv/bin:$PATH"

EXPOSE 8080

RUN adduser --disabled-password --uid 1000 appuser
USER 1000

CMD ["python", "-m", "app.agents.report_generation.deployment"]
6 changes: 6 additions & 0 deletions app/agents/report_generation/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ def create_agentcore_runtime():
app = BedrockAgentCoreApp()
app.entrypoint(agentcore_entrypoint)
return app


if __name__ == "__main__":
# AgentCore Runtime 컨테이너의 CMD 진입점. AWS의 invocation 프로토콜에 맞춰
# BedrockAgentCoreApp이 자체적으로 8080 포트에 /invocations, /ping을 서빙한다.
create_agentcore_runtime().run()
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies = [
"opentelemetry-instrumentation-httpx>=0.50b0",
"opentelemetry-instrumentation-sqlalchemy>=0.50b0",
"opentelemetry-instrumentation-botocore>=0.50b0",
"bedrock-agentcore>=1.17.0",
]

[project.optional-dependencies]
Expand Down
39 changes: 30 additions & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading