Spaces:
Paused
Paused
File size: 1,255 Bytes
261730f 6032644 e7560a4 6032644 e7560a4 261730f 6032644 261730f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV DISPLAY=:1
ENV LC_ALL=C.UTF-8
# Base packages
RUN apt-get update && apt-get install -y \
python3 python3-pip \
xvfb \
fluxbox \
scrot \
xdotool \
xclip \
xauth \
x11-utils \
imagemagick \
feh \
fonts-noto \
curl wget ca-certificates \
software-properties-common \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Firefox from Mozilla PPA (stable on Ubuntu 22.04)
RUN add-apt-repository ppa:mozillateam/ppa -y \
&& echo 'Package: *\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 1001' \
> /etc/apt/preferences.d/mozilla-firefox \
&& apt-get update \
&& apt-get install -y firefox \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# firefox-esr symlink — الـ AI يستدعي firefox-esr دائماً
RUN ln -sf $(which firefox) /usr/local/bin/firefox-esr && \
echo "firefox-esr → $(which firefox)" && \
firefox-esr --version
# Python dependencies
COPY requirements.txt /app/requirements.txt
RUN pip3 install --no-cache-dir -r /app/requirements.txt
# App files
WORKDIR /app
COPY app.py /app/app.py
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 7860
CMD ["/app/start.sh"]
|