Update Dockerfile
Browse files- Dockerfile +38 -7
Dockerfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
FROM python:3.11
|
2 |
|
3 |
-
|
|
|
|
|
4 |
RUN apt -qq update && \
|
5 |
apt -qq install -y --no-install-recommends \
|
6 |
ffmpeg \
|
@@ -9,6 +11,22 @@ RUN apt -qq update && \
|
|
9 |
gnupg2 \
|
10 |
unzip \
|
11 |
wget \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
python3-dev \
|
13 |
python3-pip \
|
14 |
libavformat-dev \
|
@@ -18,19 +36,34 @@ RUN apt -qq update && \
|
|
18 |
libavutil-dev \
|
19 |
libswscale-dev \
|
20 |
libswresample-dev \
|
|
|
|
|
21 |
neofetch && \
|
22 |
apt-get clean && \
|
23 |
rm -rf /var/lib/apt/lists/
|
24 |
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
# Copy application code and install Python dependencies
|
29 |
COPY . .
|
30 |
-
RUN pip3 install --upgrade pip setuptools
|
31 |
COPY requirements.txt .
|
|
|
32 |
RUN pip3 install -r requirements.txt
|
33 |
|
|
|
|
|
34 |
RUN chown -R 1000:0 .
|
35 |
RUN chmod 777 .
|
36 |
RUN chown -R 1000:0 /app
|
@@ -44,8 +77,6 @@ RUN md5sum -c ffmpeg-git-amd64-static.tar.xz.md5
|
|
44 |
RUN tar xvf ffmpeg-git-amd64-static.tar.xz
|
45 |
RUN mv ffmpeg-git*/ffmpeg ffmpeg-git*/ffprobe /usr/local/bin/
|
46 |
|
47 |
-
# Expose the required port
|
48 |
EXPOSE 7860
|
49 |
|
50 |
-
# Run the application
|
51 |
CMD ["bash", "-c", "python3 server.py & python3 -m Akeno"]
|
|
|
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 \
|
|
|
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 \
|
|
|
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 /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
|
63 |
RUN pip3 install -r requirements.txt
|
64 |
|
65 |
+
RUN chmod +x /usr/local/bin/chromedriver
|
66 |
+
RUN chmod +x /usr/bin/google-chrome
|
67 |
RUN chown -R 1000:0 .
|
68 |
RUN chmod 777 .
|
69 |
RUN chown -R 1000:0 /app
|
|
|
77 |
RUN tar xvf ffmpeg-git-amd64-static.tar.xz
|
78 |
RUN mv ffmpeg-git*/ffmpeg ffmpeg-git*/ffprobe /usr/local/bin/
|
79 |
|
|
|
80 |
EXPOSE 7860
|
81 |
|
|
|
82 |
CMD ["bash", "-c", "python3 server.py & python3 -m Akeno"]
|