Alvin3y1 commited on
Commit
279fca8
·
verified ·
1 Parent(s): c3edbc4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -3,12 +3,7 @@ FROM python:3.11-slim-bullseye
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  # Install System Dependencies
6
- # - xvfb: Virtual Framebuffer
7
- # - xdotool: Input injection
8
- # - plasma-desktop: UI
9
- # - dbus-x11: Plasma requirement
10
- # - build-essential: For compiling python extensions
11
- # - procps: For psutil
12
  RUN apt-get update && apt-get install -y --no-install-recommends \
13
  xvfb \
14
  x11-utils \
@@ -26,12 +21,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
26
  libxtst6 \
27
  libxext-dev \
28
  libxrender-dev \
 
29
  curl \
30
  wget \
31
  procps \
32
  && rm -rf /var/lib/apt/lists/*
33
 
34
  # Setup User
 
35
  RUN useradd -m -u 1000 user
36
  USER user
37
  ENV HOME=/home/user \
@@ -41,6 +38,7 @@ ENV HOME=/home/user \
41
  WORKDIR $HOME/app
42
 
43
  # Install Python Dependencies
 
44
  COPY --chown=user:user requirements.txt .
45
  RUN pip install --no-cache-dir --upgrade pip && \
46
  pip install --no-cache-dir -r requirements.txt
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  # Install System Dependencies
6
+ # Added: libturbojpeg0 (Critical for fast JPEG encoding)
 
 
 
 
 
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  xvfb \
9
  x11-utils \
 
21
  libxtst6 \
22
  libxext-dev \
23
  libxrender-dev \
24
+ libturbojpeg0 \
25
  curl \
26
  wget \
27
  procps \
28
  && rm -rf /var/lib/apt/lists/*
29
 
30
  # Setup User
31
+ # We create a user to avoid running X11/Pulse/Plasma as root (which causes issues)
32
  RUN useradd -m -u 1000 user
33
  USER user
34
  ENV HOME=/home/user \
 
38
  WORKDIR $HOME/app
39
 
40
  # Install Python Dependencies
41
+ # Ensure requirements.txt includes: PyTurboJPEG, mss, aiohttp, aiortc, psutil, python-xlib, Pillow
42
  COPY --chown=user:user requirements.txt .
43
  RUN pip install --no-cache-dir --upgrade pip && \
44
  pip install --no-cache-dir -r requirements.txt