Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assistance with Streamlit Exposure on Port 8501 #141

Open
arafatkatze opened this issue Oct 31, 2024 · 1 comment
Open

Assistance with Streamlit Exposure on Port 8501 #141

arafatkatze opened this issue Oct 31, 2024 · 1 comment

Comments

@arafatkatze
Copy link

I originally faced it here #41

But once I closed that container and reran I can't seem to make streamlit app work for me.

I've been trying to set up the Computer Use Demo using Docker, but I'm unable to access the Streamlit interfaces. I've tried several approaches, including using proxies and direct access, but nothing seems to work. Below are the details of what I've attempted:

  1. Updated index.html to use host.docker.internal because I am on a mac machine
  2. . Docker Port Mapping:
    Verified that ports 8501, 6080, and 8080 are exposed in Docker.
  3. Streamlit Configuration:
    Ensured Streamlit is configured to allow connections:
[server]
fileWatcherType = "auto"
runOnSave = true
enableCORS = true
[browser]
gatherUsageStats = false
baseUrlPath = "streamlit"
[browser]
  1. Checked and manipulated entry point script to make sure that streamlit actually starts

#!/bin/bash
set -e

./start_all.sh
./novnc_startup.sh

python http_server.py > /tmp/server_logs.txt 2>&1 &

STREAMLIT_SERVER_PORT=8501 python -m streamlit run computer_use_demo/streamlit.py > /tmp/streamlit_stdout.log &
echo "🚀 Starting Streamlit on port 8501..."
echo "✨ Computer Use Demo is ready!"
echo "➡️  Open http://localhost:8080 in your browser to begin"

# Keep the container running
tail -f /dev/null

  1. NOTE Streamlit responds within the container itself but its only when I try to connect to it from outside the container that everything fails

I have tried everything standard like restarting containers, checking docker logs running the docker build locally, tweaking host ip and many other related ideas. Any help is welcome at this point @chrisgorgo @x5a

@p-i-
Copy link

p-i- commented Nov 3, 2024

What is the output of your docker run look like?

A correct output should look something like:

pi@πlocal ~/code/anthropic-quickstarts/computer-use-demo
> ./run.sh --image d2 --container d2
bla bla
Xvfb started successfully on display :1
Xvfb PID: 13
starting tint2 on display :1 ...
starting mutter
starting vnc
starting noVNC
noVNC started successfully
^ are you getting all of these?
✨ Computer Use Demo is ready!
➡️  Open http://localhost:8080 in your browser to begin

It should work out of the box on macOS.

Ah, unless there's some port-used problem -- does #147 help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants