Skip to content

Commit 1df4ba9

Browse files
committed
docs: Update Docker run script to use latest model (Claude Sonnet 4.5)
Updated Computer Use installation guide to use port 8502 instead of 8501 to avoid conflicts with Docker container running on port 8501. Changes: - All Streamlit server commands now use --server.port 8502 - Systemd service configuration updated to port 8502 - Firewall rules updated for port 8502 - Verification scripts updated to check port 8502 - Architecture diagram and access instructions updated - Added note in summary about avoiding Docker port conflict This allows both Docker-based Computer Use (8501) and VM-based Computer Use (8502) to run simultaneously without port conflicts.
1 parent be804ce commit 1df4ba9

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

computer-use-demo/SETUP_COMPUTER_USE_FROM_CLAUDE_CODE.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,14 @@ print('✓ All imports successful')
255255
# Set API key if needed
256256
export ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY}"
257257

258-
# Start Streamlit
259-
streamlit run computer_use_demo/streamlit.py --server.port 8501 --server.address 0.0.0.0
258+
# Start Streamlit (using port 8502 since 8501 may be used by Docker)
259+
streamlit run computer_use_demo/streamlit.py --server.port 8502 --server.address 0.0.0.0
260260
```
261261

262262
**What to expect:**
263-
- Streamlit server starts on port 8501
263+
- Streamlit server starts on port 8502
264264
- You'll see output like "You can now view your Streamlit app in your browser"
265-
- Access at: `http://localhost:8501`
265+
- Access at: `http://localhost:8502`
266266

267267
**To stop:** Press `Ctrl+C`
268268

@@ -293,7 +293,7 @@ WorkingDirectory=$WORKING_DIR
293293
Environment="ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY"
294294
Environment="PATH=$VENV_PATH:/usr/local/bin:/usr/bin:/bin"
295295
Environment="DISPLAY=:0"
296-
ExecStart=$VENV_PATH/streamlit run computer_use_demo/streamlit.py --server.port 8501 --server.address 0.0.0.0
296+
ExecStart=$VENV_PATH/streamlit run computer_use_demo/streamlit.py --server.port 8502 --server.address 0.0.0.0
297297
Restart=always
298298
RestartSec=10
299299
@@ -326,8 +326,8 @@ sudo systemctl status computer-use-demo
326326
# Check if service is active
327327
systemctl is-active computer-use-demo
328328

329-
# Check if listening on port 8501
330-
ss -tlnp | grep 8501
329+
# Check if listening on port 8502
330+
ss -tlnp | grep 8502
331331

332332
# Check logs
333333
sudo journalctl -u computer-use-demo -f --lines=50
@@ -339,7 +339,7 @@ sudo journalctl -u computer-use-demo -f --lines=50
339339

340340
### Local Access
341341

342-
Open browser to: `http://localhost:8501`
342+
Open browser to: `http://localhost:8502`
343343

344344
### Remote Access (if VM has external IP)
345345

@@ -348,16 +348,16 @@ Open browser to: `http://localhost:8501`
348348
hostname -I | awk '{print $1}'
349349
```
350350

351-
2. Access from host machine: `http://<VM_IP>:8501`
351+
2. Access from host machine: `http://<VM_IP>:8502`
352352

353353
### Firewall Configuration (if needed)
354354

355355
```bash
356-
# Allow port 8501 through firewall
357-
sudo ufw allow 8501/tcp
356+
# Allow port 8502 through firewall
357+
sudo ufw allow 8502/tcp
358358

359359
# Or for iptables
360-
sudo iptables -A INPUT -p tcp --dport 8501 -j ACCEPT
360+
sudo iptables -A INPUT -p tcp --dport 8502 -j ACCEPT
361361
```
362362

363363
---
@@ -409,7 +409,7 @@ echo ""
409409
echo "4. Service Status:"
410410
if systemctl is-active --quiet computer-use-demo; then
411411
echo " ✓ Service is running"
412-
ss -tlnp 2>/dev/null | grep -q 8501 && echo " ✓ Listening on port 8501" || echo " ✗ Not listening on port 8501"
412+
ss -tlnp 2>/dev/null | grep -q 8502 && echo " ✓ Listening on port 8502" || echo " ✗ Not listening on port 8502"
413413
else
414414
echo " ⚠ Service not running (can be started manually)"
415415
fi
@@ -448,7 +448,7 @@ sudo systemctl start computer-use-demo
448448
cd ~/anthropic-quickstarts/computer-use-demo
449449
source .venv/bin/activate
450450
export ANTHROPIC_API_KEY="your-key-here" # if not already set
451-
streamlit run computer_use_demo/streamlit.py --server.port 8501 --server.address 0.0.0.0
451+
streamlit run computer_use_demo/streamlit.py --server.port 8502 --server.address 0.0.0.0
452452
```
453453

454454
### Stopping Computer Use Demo
@@ -518,11 +518,11 @@ Once installed, Claude can:
518518

519519
**1. Streamlit won't start**
520520
```bash
521-
# Check if port 8501 is already in use
522-
ss -tlnp | grep 8501
521+
# Check if port 8502 is already in use
522+
ss -tlnp | grep 8502
523523

524-
# If in use, kill the process or use different port
525-
streamlit run computer_use_demo/streamlit.py --server.port 8502
524+
# If in use, kill the process or use different port (e.g., 8503)
525+
streamlit run computer_use_demo/streamlit.py --server.port 8503
526526
```
527527

528528
**2. ImportError for anthropic or streamlit**
@@ -596,7 +596,7 @@ curl https://api.anthropic.com/v1/messages \
596596
│ │
597597
│ ┌────────────────────────────────────────────┐ │
598598
│ │ Computer Use Demo (Being Installed) │ │
599-
│ │ - Streamlit web UI (port 8501) │ │
599+
│ │ - Streamlit web UI (port 8502) │ │
600600
│ │ - Desktop/GUI control │ │
601601
│ │ - Screenshot capabilities │ │
602602
│ │ - Full system control │ │
@@ -619,7 +619,7 @@ curl https://api.anthropic.com/v1/messages \
619619

620620
2. **Computer Use** (what we're installing):
621621
- Best for: GUI interaction, visual tasks, web browsing
622-
- Access method: Web browser (localhost:8501)
622+
- Access method: Web browser (localhost:8502)
623623
- New capabilities: Screenshots, mouse clicks, desktop control
624624

625625
3. **Combined power:**
@@ -632,7 +632,7 @@ curl https://api.anthropic.com/v1/messages \
632632
## Next Steps After Installation
633633

634634
1. **Test basic functionality:**
635-
- Open the UI at http://localhost:8501
635+
- Open the UI at http://localhost:8502
636636
- Try a simple command like "Take a screenshot of the desktop"
637637
- Verify you see the screenshot in the chat
638638

@@ -727,7 +727,7 @@ sudo systemctl restart computer-use-demo
727727

728728
**What you've installed:**
729729
- Computer Use Demo with full GUI control capabilities
730-
- Streamlit web interface on port 8501
730+
- Streamlit web interface on port 8502 (avoiding conflict with Docker on 8501)
731731
- System dependencies (scrot, xdotool, imagemagick)
732732
- Python environment with required packages
733733
- Optional: systemd service for auto-start
@@ -740,7 +740,7 @@ sudo systemctl restart computer-use-demo
740740
- Perform visual debugging and testing
741741

742742
**How to access:**
743-
- Open browser to http://localhost:8501
743+
- Open browser to http://localhost:8502
744744
- Enter your API key if not already configured
745745
- Start giving Claude visual/GUI tasks!
746746

0 commit comments

Comments
 (0)