FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04 ENV DEBIAN_FRONTEND=noninteractive \ TZ=Asia/Kolkata \ PYTHONUNBUFFERED=1 # Install base dependencies RUN rm -f /etc/apt/sources.list.d/*.list && \ apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates sudo git wget procps git-lfs \ zip unzip htop vim nano bzip2 libx11-6 build-essential \ libsndfile-dev python3-pip python3-venv software-properties-common \ && rm -rf /var/lib/apt/lists/* # Clone the web-ui repository RUN git clone https://github.com/browser-use/web-ui.git /web-ui WORKDIR /web-ui # Install uv RUN pip install uv # Create venv RUN uv venv --python 3.11 # Ensure python is executable RUN chmod +x /web-ui/.venv/bin/python # Install dependencies and chromium RUN /web-ui/.venv/bin/python -m ensurepip --upgrade && \ /web-ui/.venv/bin/pip install --upgrade pip uv playwright && \ /web-ui/.venv/bin/pip install -r requirements.txt && \ /web-ui/.venv/bin/playwright install --with-deps chromium # Fix permissions (recursive + follow symlinks) RUN chmod -R a+rx /web-ui/.venv && chmod -R a+r /web-ui EXPOSE 7860 # Keep root to avoid runtime permission drops USER root CMD ["/web-ui/.venv/bin/python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]