Update Dockerfile
Browse files- Dockerfile +16 -15
Dockerfile
CHANGED
|
@@ -3,7 +3,10 @@ FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04
|
|
| 3 |
# Environment settings
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive \
|
| 5 |
TZ=Asia/Kolkata \
|
| 6 |
-
PYTHONUNBUFFERED=1
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Install required OS packages (minimal set)
|
| 9 |
RUN rm -f /etc/apt/sources.list.d/*.list && \
|
|
@@ -28,14 +31,23 @@ RUN rm -f /etc/apt/sources.list.d/*.list && \
|
|
| 28 |
xfce4 xfce4-goodies \
|
| 29 |
x11vnc \
|
| 30 |
novnc websockify \
|
|
|
|
|
|
|
| 31 |
&& rm -rf /var/lib/apt/lists/*
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# Clone repository
|
| 34 |
RUN git clone https://github.com/browser-use/web-ui.git /web-ui
|
| 35 |
WORKDIR /web-ui
|
| 36 |
|
| 37 |
COPY webui_with_vnc.py start.sh /web-ui/
|
| 38 |
|
|
|
|
|
|
|
|
|
|
| 39 |
# Create a non-root user and switch to it
|
| 40 |
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
|
| 41 |
&& chown -R user:user /web-ui
|
|
@@ -74,19 +86,8 @@ RUN chown -R user:user /web-ui && chmod -R 755 /web-ui
|
|
| 74 |
|
| 75 |
# Use Conda environment Python explicitly
|
| 76 |
# CMD ["/home/user/miniconda/envs/webui/bin/python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]
|
| 77 |
-
# CMD bash -c "\
|
| 78 |
-
# x11vnc -forever -nopw -display :0 & \
|
| 79 |
-
# websockify --web=/usr/share/novnc/ 7860 localhost:5900 & \
|
| 80 |
-
# /home/user/miniconda/envs/webui/bin/python webui.py --ip 0.0.0.0 --port 7860 \
|
| 81 |
-
# "
|
| 82 |
-
|
| 83 |
-
|
| 84 |
|
| 85 |
-
CMD ["/web-ui/start.sh"]
|
| 86 |
|
| 87 |
-
#
|
| 88 |
-
|
| 89 |
-
# x11vnc -forever -nopw -display :0 -rfbport 5900 & \
|
| 90 |
-
# websockify --web=/usr/share/novnc/ 6080 localhost:5900 & \
|
| 91 |
-
# cp -r /usr/share/novnc /web-ui/static/novnc && \
|
| 92 |
-
# /home/user/miniconda/envs/webui/bin/python /web-ui/webui_with_vnc.py \
|
|
|
|
| 3 |
# Environment settings
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive \
|
| 5 |
TZ=Asia/Kolkata \
|
| 6 |
+
PYTHONUNBUFFERED=1 \
|
| 7 |
+
RESOLUTION=1280x720x24 \
|
| 8 |
+
VNC_PASSWORD=password
|
| 9 |
+
|
| 10 |
|
| 11 |
# Install required OS packages (minimal set)
|
| 12 |
RUN rm -f /etc/apt/sources.list.d/*.list && \
|
|
|
|
| 31 |
xfce4 xfce4-goodies \
|
| 32 |
x11vnc \
|
| 33 |
novnc websockify \
|
| 34 |
+
supervisor \
|
| 35 |
+
xvfb \
|
| 36 |
&& rm -rf /var/lib/apt/lists/*
|
| 37 |
|
| 38 |
+
# Create directory for noVNC
|
| 39 |
+
RUN mkdir -p /opt/novnc && \
|
| 40 |
+
ln -s /usr/share/novnc/* /opt/novnc/
|
| 41 |
+
|
| 42 |
# Clone repository
|
| 43 |
RUN git clone https://github.com/browser-use/web-ui.git /web-ui
|
| 44 |
WORKDIR /web-ui
|
| 45 |
|
| 46 |
COPY webui_with_vnc.py start.sh /web-ui/
|
| 47 |
|
| 48 |
+
# Copy your custom supervisor config
|
| 49 |
+
COPY /web-ui/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
| 50 |
+
|
| 51 |
# Create a non-root user and switch to it
|
| 52 |
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
|
| 53 |
&& chown -R user:user /web-ui
|
|
|
|
| 86 |
|
| 87 |
# Use Conda environment Python explicitly
|
| 88 |
# CMD ["/home/user/miniconda/envs/webui/bin/python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
+
# CMD ["/web-ui/start.sh"]
|
| 91 |
|
| 92 |
+
# Start supervisor
|
| 93 |
+
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
|
|
|
|
|
|
|
|
|
|
|