|
|
|
FROM python:3.10.0 as builder |
|
|
|
RUN useradd -ms /bin/bash admin |
|
|
|
WORKDIR /srv |
|
RUN chown -R admin:admin /srv |
|
RUN chmod -R 755 /srv |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y wget ffmpeg curl aria2 |
|
|
|
RUN apt-get install -y \ |
|
fonts-liberation \ |
|
libatk-bridge2.0-0 \ |
|
libatk1.0-0 \ |
|
libatspi2.0-0 \ |
|
libcups2 \ |
|
libdrm2 \ |
|
libgbm1 \ |
|
libgtk-3-0 \ |
|
libnspr4 \ |
|
libnss3 \ |
|
libu2f-udev \ |
|
libvulkan1 \ |
|
libxcomposite1 \ |
|
libxdamage1 \ |
|
mesa-vulkan-drivers\ |
|
libxfixes3 \ |
|
libasound2 \ |
|
libxkbcommon0 \ |
|
libxrandr2 \ |
|
xdg-utils |
|
|
|
|
|
COPY --chown=admin . /srv |
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
software-properties-common \ |
|
npm |
|
RUN npm install npm@latest -g && \ |
|
npm install n -g && \ |
|
n latest |
|
|
|
|
|
|
|
RUN echo npm -v |
|
RUN node -v |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN pipx ensurepath |
|
RUN pipx install unsilence |
|
|
|
|
|
|
|
|
|
|
|
|
|
CMD python -m uvicorn App.app:app --host 0.0.0.0 --port 7860 & python -m celery -A App.Worker.celery worker -c 5 --max-tasks-per-child=1 --without-heartbeat |
|
|
|
|
|
|
|
|
|
EXPOSE 7860 |