|
| 1 | +# syntax=docker/dockerfile:1.3 |
| 2 | +FROM python:3.12-slim |
| 3 | +COPY --from=ghcr.io/astral-sh/uv:0.6.4 /uv /uvx /bin/ |
| 4 | + |
| 5 | +# Install system dependencies |
| 6 | +RUN apt-get update && apt-get install -y \ |
| 7 | + htop \ |
| 8 | + vim \ |
| 9 | + curl \ |
| 10 | + tar \ |
| 11 | + python3-dev \ |
| 12 | + postgresql-client \ |
| 13 | + build-essential \ |
| 14 | + libpq-dev \ |
| 15 | + gcc \ |
| 16 | + cmake \ |
| 17 | + netcat-openbsd \ |
| 18 | + nodejs \ |
| 19 | + npm \ |
| 20 | + && apt-get clean \ |
| 21 | + && rm -rf /var/lib/apt/lists/** |
| 22 | + |
| 23 | +# Install tctl (Temporal CLI) |
| 24 | +RUN curl -L https://github.com/temporalio/tctl/releases/download/v1.18.1/tctl_1.18.1_linux_arm64.tar.gz -o /tmp/tctl.tar.gz && \ |
| 25 | + tar -xzf /tmp/tctl.tar.gz -C /usr/local/bin && \ |
| 26 | + chmod +x /usr/local/bin/tctl && \ |
| 27 | + rm /tmp/tctl.tar.gz |
| 28 | + |
| 29 | +RUN uv pip install --system --upgrade pip setuptools wheel |
| 30 | + |
| 31 | +ENV UV_HTTP_TIMEOUT=1000 |
| 32 | + |
| 33 | +# Copy pyproject.toml and README.md to install dependencies |
| 34 | +COPY 060_open_ai_agents_sdk_hello_world/pyproject.toml /app/060_open_ai_agents_sdk_hello_world/pyproject.toml |
| 35 | +COPY 060_open_ai_agents_sdk_hello_world/README.md /app/060_open_ai_agents_sdk_hello_world/README.md |
| 36 | + |
| 37 | +WORKDIR /app/060_open_ai_agents_sdk_hello_world |
| 38 | + |
| 39 | +# Copy the project code |
| 40 | +COPY 060_open_ai_agents_sdk_hello_world/project /app/060_open_ai_agents_sdk_hello_world/project |
| 41 | + |
| 42 | +# Install the required Python packages from pyproject.toml |
| 43 | +RUN uv pip install --system . |
| 44 | + |
| 45 | +WORKDIR /app/060_open_ai_agents_sdk_hello_world |
| 46 | + |
| 47 | + |
| 48 | +ENV PYTHONPATH=/app |
| 49 | +# Run the ACP server using uvicorn |
| 50 | +CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"] |
| 51 | + |
| 52 | +# When we deploy the worker, we will replace the CMD with the following |
| 53 | +# CMD ["python", "-m", "run_worker"] |
0 commit comments