c632a9d147
Deploy Research Workbench / deploy (push) Failing after 12m28s
Sequential build failures fixed: 1. uv run playwright install chromium → playwright not in pyproject.toml/venv Fix: npm install -g @playwright/cli playwright && playwright install chromium Also installs @playwright/cli (the browser CLI used by research agents) 2. uv pip install amplifierd → package not on PyPI Fix: uv pip install --system from github.com/microsoft/amplifierd Also installs amplifier-foundation (also not on PyPI, git-only dep) Uses uv (not plain pip) to respect [tool.uv.sources] resolution 3. COPY frontend/dist/ → dist is gitignored, breaks fresh-clone builds Fix: build the frontend inside Docker using the installed Node.js (npm ci + npm run build); removes the pre-built dist assumption Other fixes: - Add git to apt-get (required for pip/uv git+https installs) - Fix entrypoint.sh: amplifierd uses 'serve' subcommand and NAME=URI bundle format — was: amplifierd --port ... --bundle /path now: amplifierd serve --port ... --bundle name=/path --default-bundle name - Add .dockerignore to exclude node_modules, .venv, dist, .git, etc. (keeps build context small and avoids stale artifacts in COPY steps)
62 lines
1.4 KiB
Bash
Executable File
62 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
export DISPLAY=:99
|
|
|
|
echo "=== Starting Research Workbench ==="
|
|
|
|
# (1) Start Xvfb
|
|
Xvfb :99 -screen 0 1280x720x24 -ac &
|
|
sleep 1
|
|
echo "[OK] Xvfb display :99"
|
|
|
|
# (2) Start x11vnc (suppress stderr)
|
|
x11vnc -display :99 -forever -nopw -listen 0.0.0.0 -rfbport 5900 -shared 2>/dev/null &
|
|
sleep 1
|
|
echo "[OK] x11vnc on :5900"
|
|
|
|
# (3) Start noVNC via websockify
|
|
websockify --web=/usr/share/novnc/ 6080 localhost:5900 &
|
|
sleep 1
|
|
echo "[OK] noVNC on :6080"
|
|
|
|
# (4) Start amplifierd and wait for it to be healthy
|
|
# amplifierd uses a 'serve' subcommand; --bundle requires NAME=URI format
|
|
cd /app
|
|
amplifierd serve --port 8410 \
|
|
--bundle "research-workbench=/app/bundle/bundle.md" \
|
|
--default-bundle research-workbench &
|
|
AMPLIFIERD_PID=$!
|
|
|
|
echo "Waiting for amplifierd..."
|
|
READY=0
|
|
for i in $(seq 1 30); do
|
|
if curl -s http://localhost:8410/health > /dev/null 2>&1; then
|
|
echo "[OK] amplifierd on :8410"
|
|
READY=1
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|
|
if [ "$READY" -eq 0 ]; then
|
|
echo "[ERROR] amplifierd failed to start within 30s — aborting" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# (5) Start FastAPI backend
|
|
cd /app/backend
|
|
uv run python -m uvicorn app:app --host 0.0.0.0 --port 8080 --log-level info &
|
|
sleep 2
|
|
echo "[OK] FastAPI on :8080"
|
|
|
|
echo ""
|
|
echo "Research Workbench: http://localhost:8080"
|
|
echo "Browser VNC: http://localhost:6080"
|
|
|
|
# CMD passthrough or wait on amplifierd
|
|
if [ $# -eq 0 ]; then
|
|
wait $AMPLIFIERD_PID
|
|
else
|
|
exec "$@"
|
|
fi
|