Skip to content

Commit b4d345b

Browse files
authored
Merge pull request #72 from scaleapi/jason/custom-activities
jason/custom activities
2 parents 361c2a6 + 6aa412f commit b4d345b

File tree

17 files changed

+4420
-6
lines changed

17 files changed

+4420
-6
lines changed

examples/tutorials/10_agentic/10_temporal/000_hello_acp/project/run_worker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from workflow import At000HelloAcpWorkflow
1010

1111

12+
1213
environment_variables = EnvironmentVariables.refresh()
1314

1415
logger = make_logger(__name__)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
23+
# Environments
24+
.env**
25+
.venv
26+
env/
27+
venv/
28+
ENV/
29+
env.bak/
30+
venv.bak/
31+
32+
# IDE
33+
.idea/
34+
.vscode/
35+
*.swp
36+
*.swo
37+
38+
# Git
39+
.git
40+
.gitignore
41+
42+
# Misc
43+
.DS_Store
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
&& apt-get clean \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
# Install tctl (Temporal CLI)
22+
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 && \
23+
tar -xzf /tmp/tctl.tar.gz -C /usr/local/bin && \
24+
chmod +x /usr/local/bin/tctl && \
25+
rm /tmp/tctl.tar.gz
26+
27+
RUN uv pip install --system --upgrade pip setuptools wheel
28+
29+
ENV UV_HTTP_TIMEOUT=1000
30+
31+
# Copy just the pyproject.toml file to optimize caching
32+
COPY 030_custom_activities/pyproject.toml /app/030_custom_activities/pyproject.toml
33+
34+
WORKDIR /app/030_custom_activities
35+
36+
# Install the required Python packages using uv
37+
RUN uv pip install --system .
38+
39+
# Copy the project code
40+
COPY 030_custom_activities/project /app/030_custom_activities/project
41+
42+
# Run the ACP server using uvicorn
43+
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
44+
45+
# When we deploy the worker, we will replace the CMD with the following
46+
# CMD ["python", "-m", "run_worker"]

0 commit comments

Comments
 (0)