Skip to content

Commit d47800c

Browse files
committed
Revert pip cache approach, restore working pip install
1 parent da4473e commit d47800c

2 files changed

Lines changed: 11 additions & 23 deletions

File tree

docker/Dockerfile.agents

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,17 @@
66
# - openai
77
# - temporalio[openai-agents] (Temporal + OpenAI Agents integration)
88
# - Exercise directories baked into /opt/exercises/
9-
# - pip cache at /opt/pip-cache for fast VM provisioning
109
#
1110
# OPENAI_API_KEY is injected at runtime by the Instruqt environment config —
1211
# it is never baked into this image.
1312

1413
FROM ghcr.io/mmerrell/temporal-python-sandbox:latest
1514

1615
# ─── Agent framework dependencies ─────────────────────────────────────────────
17-
# Cache pip downloads in /opt/pip-cache so the setup script can copy them
18-
# to the VM and install without any network downloads.
19-
RUN pip install \
20-
--cache-dir /opt/pip-cache \
16+
RUN pip install --no-cache-dir \
2117
openai-agents \
2218
openai \
23-
"temporalio[openai-agents]" \
24-
httpx \
25-
pydantic \
26-
python-dotenv \
27-
rich
19+
"temporalio[openai-agents]"
2820

2921
# ─── Exercise source code ─────────────────────────────────────────────────────
3022
COPY exercises/02-building-from-scratch /opt/exercises/02-building-from-scratch

track/track_scripts/setup-workshop-host

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ for i in $(seq 1 30); do
6363
sleep 3
6464
done
6565

66-
# ─── Pull agents image (used for code-server, pip cache, and exercises) ───────
66+
# ─── Pull agents image (used for code-server, extension data, and exercises) ──
6767
docker pull ghcr.io/mmerrell/temporal-python-agents-sandbox:latest
6868
docker create --name tmp-sandbox ghcr.io/mmerrell/temporal-python-agents-sandbox:latest
6969

7070
# ─── code-server ──────────────────────────────────────────────────────────────
71-
# Install the native binary (fast), copy extension data from image (no download)
7271
curl -fsSL https://code-server.dev/install.sh | sh
7372

7473
mkdir -p /root/.local/share/code-server
@@ -124,15 +123,10 @@ done
124123

125124
# ─── Exercise code ────────────────────────────────────────────────────────────
126125
docker cp tmp-sandbox:/opt/exercises /workspace/exercises
127-
128-
# ─── Python dependencies (install from cached wheels — no network downloads) ──
129-
docker cp tmp-sandbox:/opt/pip-cache /opt/pip-cache
130126
docker rm tmp-sandbox
131127

132-
pip install \
133-
--no-index \
134-
--find-links /opt/pip-cache \
135-
--ignore-installed \
128+
# ─── Python dependencies ──────────────────────────────────────────────────────
129+
pip install --no-cache-dir --ignore-installed \
136130
temporalio \
137131
"temporalio[openai-agents]" \
138132
openai-agents \
@@ -142,11 +136,13 @@ pip install \
142136
python-dotenv \
143137
rich
144138

145-
# ─── Shell environment ─────────────────────────────────────────────────────────
146-
cat >> /root/.bashrc <<'EOF'
139+
# ─── Environment variables ─────────────────────────────────────────────────────
140+
echo "TEMPORAL_ADDRESS=127.0.0.1:7233" >> /etc/environment
141+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" >> /etc/environment
147142

148-
export TEMPORAL_ADDRESS="127.0.0.1:7233"
149-
export OPENAI_API_KEY="${OPENAI_API_KEY}"
143+
echo "export TEMPORAL_ADDRESS=127.0.0.1:7233" >> /root/.bashrc
144+
echo "export OPENAI_API_KEY=${OPENAI_API_KEY}" >> /root/.bashrc
145+
cat >> /root/.bashrc <<'EOF'
150146
alias tl="temporal workflow list"
151147
alias rw="python run_worker.py"
152148
alias rs="python run_starter.py"

0 commit comments

Comments
 (0)