Spaces:
Running
Running
File size: 2,114 Bytes
d8549ef 6c02ad6 b2caf67 142c849 84d30e6 b2caf67 142c849 b2caf67 178768a b2caf67 1915180 1aa08f3 1915180 c00853f 1915180 1aa08f3 1915180 178768a c00853f b2caf67 86ebe26 b2caf67 4a54ffd b2caf67 f23a9bc 9ebeb9c 4a54ffd 9ebeb9c a2733f3 |
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
FROM rendyprojects/python:latest
WORKDIR /app
WORKDIR /.cache
RUN apt -qq update && \
apt -qq install -y --no-install-recommends \
ffmpeg \
curl \
git \
gnupg2 \
unzip \
wget \
xvfb \
libxi6 \
libgconf-2-4 \
libappindicator3-1 \
libxrender1 \
libxtst6 \
libnss3 \
libatk1.0-0 \
libxss1 \
fonts-liberation \
libasound2 \
libgbm-dev \
libu2f-udev \
libvulkan1 \
libgl1-mesa-dri \
xdg-utils \
python3-dev \
python3-pip \
libavformat-dev \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavutil-dev \
libswscale-dev \
libswresample-dev \
chromium \
chromium-driver \
neofetch && \
apt-get clean && \
rm -rf /var/lib/apt/lists/
RUN mkdir -p /tmp/ && \
cd /tmp/ && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
dpkg -i ./google-chrome-stable_current_amd64.deb; apt -fqqy install && \
rm ./google-chrome-stable_current_amd64.deb
RUN mkdir -p /tmp/ && \
cd /tmp/ && \
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \
unzip -o /tmp/chromedriver.zip chromedriver -d /usr/bin/ && \
rm /tmp/chromedriver.zip
ENV CHROME_DRIVER /usr/bin/chromedriver
ENV CHROME_BIN /usr/bin/google-chrome-stable
RUN mkdir -p uploads && chmod 777 uploads
COPY . .
COPY requirements.txt .
RUN pip3 install --upgrade pip setuptools==59.6.0
RUN pip3 install -r requirements.txt
RUN chown -R 1000:0 .
RUN chmod 777 .
RUN chown -R 1000:0 /app
RUN chmod 777 /app
RUN chown -R 1000:0 /.cache
RUN chmod 777 /.cache
RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz.md5
RUN md5sum -c ffmpeg-git-amd64-static.tar.xz.md5
RUN tar xvf ffmpeg-git-amd64-static.tar.xz
RUN mv ffmpeg-git*/ffmpeg ffmpeg-git*/ffprobe /usr/local/bin/
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |