diff --git a/Dockerfile.a2a b/Dockerfile.a2a new file mode 100644 index 0000000..a256b93 --- /dev/null +++ b/Dockerfile.a2a @@ -0,0 +1,31 @@ +FROM python:3.11-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + git \ + && rm -rf /var/lib/apt/lists/* + +# Install uv +RUN pip install uv + +# Set working directory +WORKDIR /workspace + +# Clone the repository +RUN git clone --depth 1 https://github.com/google-a2a/a2a-samples . + +# Create virtual environment and install dependencies +RUN uv venv .venv +RUN . .venv/bin/activate && cd demo/ui && uv sync + +# Set the working directory to demo/ui +WORKDIR /workspace/demo/ui + +# Activate virtual environment in subsequent commands +ENV PATH="/workspace/.venv/bin:$PATH" + +# Expose port +EXPOSE 12000 + +# Default command +CMD ["uv", "run", "main.py"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7ee651c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + + a2a-ui: + build: + context: . + dockerfile: Dockerfile.a2a + ports: + - "12000:12000" + diff --git a/src/main/java/com/embabel/template/ProjectNameApplication.java b/src/main/java/com/embabel/template/ProjectNameApplication.java index 85f9ad4..dbcbcc9 100644 --- a/src/main/java/com/embabel/template/ProjectNameApplication.java +++ b/src/main/java/com/embabel/template/ProjectNameApplication.java @@ -15,7 +15,6 @@ */ package com.embabel.template; -import com.embabel.agent.config.annotation.EnableAgentShell; import com.embabel.agent.config.annotation.EnableAgents; import com.embabel.agent.config.annotation.LoggingThemes; import org.springframework.boot.SpringApplication; @@ -23,7 +22,6 @@ @SpringBootApplication -@EnableAgentShell @EnableAgents(loggingTheme = LoggingThemes.STAR_WARS) class ProjectNameApplication { public static void main(String[] args) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e665f8d..94e4932 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1,2 @@ -spring.profiles.active=shell \ No newline at end of file +spring.profiles.active=a2a +spring.main.web-application-type=servlet \ No newline at end of file