Skip to content

Commit 8f44b71

Browse files
committed
Add A2A branch
1 parent 8ac7522 commit 8f44b71

4 files changed

Lines changed: 42 additions & 3 deletions

File tree

Dockerfile.a2a

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM python:3.11-slim
2+
3+
# Install system dependencies
4+
RUN apt-get update && apt-get install -y \
5+
git \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
# Install uv
9+
RUN pip install uv
10+
11+
# Set working directory
12+
WORKDIR /workspace
13+
14+
# Clone the repository
15+
RUN git clone --depth 1 https://github.com/google-a2a/a2a-samples .
16+
17+
# Create virtual environment and install dependencies
18+
RUN uv venv .venv
19+
RUN . .venv/bin/activate && cd demo/ui && uv sync
20+
21+
# Set the working directory to demo/ui
22+
WORKDIR /workspace/demo/ui
23+
24+
# Activate virtual environment in subsequent commands
25+
ENV PATH="/workspace/.venv/bin:$PATH"
26+
27+
# Expose port
28+
EXPOSE 12000
29+
30+
# Default command
31+
CMD ["uv", "run", "main.py"]

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
3+
a2a-ui:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile.a2a
7+
ports:
8+
- "12000:12000"
9+

src/main/java/com/embabel/template/ProjectNameApplication.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515
*/
1616
package com.embabel.template;
1717

18-
import com.embabel.agent.config.annotation.EnableAgentShell;
1918
import com.embabel.agent.config.annotation.EnableAgents;
2019
import com.embabel.agent.config.annotation.LoggingThemes;
2120
import org.springframework.boot.SpringApplication;
2221
import org.springframework.boot.autoconfigure.SpringBootApplication;
2322

2423

2524
@SpringBootApplication
26-
@EnableAgentShell
2725
@EnableAgents(loggingTheme = LoggingThemes.STAR_WARS)
2826
class ProjectNameApplication {
2927
public static void main(String[] args) {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
spring.profiles.active=shell
1+
spring.profiles.active=a2a
2+
spring.main.web-application-type=servlet

0 commit comments

Comments
 (0)