Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +80 -0
Dockerfile
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.11
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
WORKDIR /.cache
|
5 |
+
|
6 |
+
RUN apt -qq update && \
|
7 |
+
apt -qq install -y --no-install-recommends \
|
8 |
+
ffmpeg \
|
9 |
+
curl \
|
10 |
+
git \
|
11 |
+
gnupg2 \
|
12 |
+
unzip \
|
13 |
+
wget \
|
14 |
+
xvfb \
|
15 |
+
libxi6 \
|
16 |
+
libgconf-2-4 \
|
17 |
+
libappindicator3-1 \
|
18 |
+
libxrender1 \
|
19 |
+
libxtst6 \
|
20 |
+
libnss3 \
|
21 |
+
libatk1.0-0 \
|
22 |
+
libxss1 \
|
23 |
+
fonts-liberation \
|
24 |
+
libasound2 \
|
25 |
+
libgbm-dev \
|
26 |
+
libu2f-udev \
|
27 |
+
libvulkan1 \
|
28 |
+
libgl1-mesa-dri \
|
29 |
+
xdg-utils \
|
30 |
+
python3-dev \
|
31 |
+
python3-pip \
|
32 |
+
libavformat-dev \
|
33 |
+
libavcodec-dev \
|
34 |
+
libavdevice-dev \
|
35 |
+
libavfilter-dev \
|
36 |
+
libavutil-dev \
|
37 |
+
libswscale-dev \
|
38 |
+
libswresample-dev \
|
39 |
+
chromium \
|
40 |
+
chromium-driver \
|
41 |
+
neofetch && \
|
42 |
+
apt-get clean && \
|
43 |
+
rm -rf /var/lib/apt/lists/
|
44 |
+
|
45 |
+
RUN mkdir -p /tmp/ && \
|
46 |
+
cd /tmp/ && \
|
47 |
+
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
|
48 |
+
dpkg -i ./google-chrome-stable_current_amd64.deb; apt -fqqy install && \
|
49 |
+
rm ./google-chrome-stable_current_amd64.deb
|
50 |
+
|
51 |
+
RUN mkdir -p /tmp/ && \
|
52 |
+
cd /tmp/ && \
|
53 |
+
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \
|
54 |
+
unzip -o /tmp/chromedriver.zip chromedriver -d /usr/bin/ && \
|
55 |
+
rm /tmp/chromedriver.zip
|
56 |
+
|
57 |
+
ENV CHROME_DRIVER /usr/bin/chromedriver
|
58 |
+
ENV CHROME_BIN /usr/bin/google-chrome-stable
|
59 |
+
|
60 |
+
COPY . .
|
61 |
+
COPY requirements.txt .
|
62 |
+
RUN pip3 install --upgrade pip setuptools==59.6.0
|
63 |
+
RUN pip3 install -r requirements.txt
|
64 |
+
|
65 |
+
RUN chown -R 1000:0 .
|
66 |
+
RUN chmod 777 .
|
67 |
+
RUN chown -R 1000:0 /app
|
68 |
+
RUN chmod 777 /app
|
69 |
+
RUN chown -R 1000:0 /.cache
|
70 |
+
RUN chmod 777 /.cache
|
71 |
+
|
72 |
+
RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
|
73 |
+
RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz.md5
|
74 |
+
RUN md5sum -c ffmpeg-git-amd64-static.tar.xz.md5
|
75 |
+
RUN tar xvf ffmpeg-git-amd64-static.tar.xz
|
76 |
+
RUN mv ffmpeg-git*/ffmpeg ffmpeg-git*/ffprobe /usr/local/bin/
|
77 |
+
|
78 |
+
EXPOSE 7860
|
79 |
+
|
80 |
+
CMD ["bash", "-c", "python3 server.py & python3 -m akn"]
|