binary1ne commited on
Commit
60b40ec
·
verified ·
1 Parent(s): 0a20a6a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -22
Dockerfile CHANGED
@@ -2,41 +2,32 @@ FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
  TZ=Asia/Kolkata \
5
- PYTHONUNBUFFERED=1
6
 
7
- # Install base dependencies
8
- RUN rm -f /etc/apt/sources.list.d/*.list && \
9
- apt-get update && apt-get install -y --no-install-recommends \
10
  curl ca-certificates sudo git wget procps git-lfs \
11
  zip unzip htop vim nano bzip2 libx11-6 build-essential \
12
  libsndfile-dev python3-pip python3-venv software-properties-common \
13
- && rm -rf /var/lib/apt/lists/*
14
 
15
- # Clone the web-ui repository
16
  RUN git clone https://github.com/browser-use/web-ui.git /web-ui
17
  WORKDIR /web-ui
18
 
19
- # Install uv
20
  RUN pip install uv
21
 
22
- # Create venv
23
- RUN uv venv --python 3.11
24
 
25
- # Ensure python is executable
26
- RUN chmod +x /web-ui/.venv/bin/python
27
 
28
- # Install dependencies and chromium
29
- RUN /web-ui/.venv/bin/python -m ensurepip --upgrade && \
30
- /web-ui/.venv/bin/pip3 install --upgrade pip uv playwright && \
31
- /web-ui/.venv/bin/pip3 install -r requirements.txt && \
32
- /web-ui/.venv/bin/playwright install --with-deps chromium
33
-
34
- # Fix permissions (recursive + follow symlinks)
35
- RUN chmod -R a+rx /web-ui/.venv && chmod -R a+r /web-ui
36
 
37
  EXPOSE 7860
38
-
39
- # Keep root to avoid runtime permission drops
40
  USER root
41
 
42
- CMD ["/web-ui/.venv/bin/python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
  TZ=Asia/Kolkata \
5
+ PYTHONUNBUFFERED=1
6
 
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
 
 
8
  curl ca-certificates sudo git wget procps git-lfs \
9
  zip unzip htop vim nano bzip2 libx11-6 build-essential \
10
  libsndfile-dev python3-pip python3-venv software-properties-common \
11
+ && rm -rf /var/lib/apt/lists/*
12
 
 
13
  RUN git clone https://github.com/browser-use/web-ui.git /web-ui
14
  WORKDIR /web-ui
15
 
 
16
  RUN pip install uv
17
 
18
+ # Create venv in /opt (exec mount)
19
+ RUN uv venv /opt/venv --python 3.11
20
 
21
+ # Ensure world execute/read
22
+ RUN chmod -R a+rx /opt/venv && chmod -R a+r /opt/venv
23
 
24
+ # Install deps in /opt/venv
25
+ RUN /opt/venv/bin/python -m ensurepip --upgrade && \
26
+ /opt/venv/bin/pip install --upgrade pip uv playwright && \
27
+ /opt/venv/bin/pip install -r requirements.txt && \
28
+ /opt/venv/bin/playwright install --with-deps chromium
 
 
 
29
 
30
  EXPOSE 7860
 
 
31
  USER root
32
 
33
+ CMD ["/opt/venv/bin/python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]