Spaces:
Running
Running
chore: unset NODE_OPTIONS for agent CLIs to prevent environment conflicts
Browse files- Dockerfile +11 -0
Dockerfile
CHANGED
|
@@ -57,6 +57,17 @@ RUN npm init -y && npm install express@4 cors morgan
|
|
| 57 |
# Install agent CLIs globally
|
| 58 |
RUN npm install -g @google/gemini-cli @anthropic-ai/claude-code @openai/codex
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
# Install Python dependencies for sync
|
| 61 |
RUN pip install --no-cache-dir --break-system-packages huggingface_hub PyYAML
|
| 62 |
|
|
|
|
| 57 |
# Install agent CLIs globally
|
| 58 |
RUN npm install -g @google/gemini-cli @anthropic-ai/claude-code @openai/codex
|
| 59 |
|
| 60 |
+
# Wrap agent CLIs so they don't inherit NODE_OPTIONS from Paperclip parent.
|
| 61 |
+
# NODE_OPTIONS=--require cloudflare-proxy.js conflicts with gemini's V8 relaunch
|
| 62 |
+
# and breaks claude-code's HTTP. Agents call public LLM APIs directly (not blocked).
|
| 63 |
+
RUN for cmd in claude gemini codex; do \
|
| 64 |
+
if [ -e /usr/local/bin/$cmd ]; then \
|
| 65 |
+
mv /usr/local/bin/$cmd /usr/local/bin/${cmd}-real && \
|
| 66 |
+
printf '#!/bin/sh\nexec env -u NODE_OPTIONS /usr/local/bin/%s-real "$@"\n' "$cmd" > /usr/local/bin/$cmd && \
|
| 67 |
+
chmod +x /usr/local/bin/$cmd; \
|
| 68 |
+
fi; \
|
| 69 |
+
done
|
| 70 |
+
|
| 71 |
# Install Python dependencies for sync
|
| 72 |
RUN pip install --no-cache-dir --break-system-packages huggingface_hub PyYAML
|
| 73 |
|