File size: 1,640 Bytes
1c1e321
f781fe7
1c1e321
a00f760
f781fe7
1c1e321
a00f760
1c1e321
f781fe7
a00f760
 
f781fe7
a00f760
 
 
 
 
 
 
f781fe7
 
 
 
 
 
 
 
 
 
 
 
 
 
a00f760
f781fe7
 
 
 
a00f760
 
 
040bd2a
a00f760
36e5180
 
4aa0fd7
 
 
36e5180
a00f760
07dca11
 
 
a913311
a00f760
 
 
a913311
a00f760
 
f781fe7
 
a00f760
40cb044
a00f760
f781fe7
a00f760
f781fe7
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
# Builder stage
FROM python:3.10.0 as builder

# Create a non-root user
RUN useradd -ms /bin/bash admin

# Set the working directory
WORKDIR /srv

# Copy requirements file first to leverage caching
COPY --chown=admin requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Install system dependencies
RUN apt-get update && \
  apt-get install -y --no-install-recommends \
  wget ffmpeg curl aria2 \
  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 \
  software-properties-common \
  npm

# Install youtubeuploader
ADD https://github.com/porjo/youtubeuploader/releases/download/23.06/youtubeuploader_23.06_Linux_x86_64.tar.gz youtubeuploader.tar.gz
RUN mkdir -p /srv/youtube && \
  tar -zxvf youtubeuploader.tar.gz -C /srv/youtube && \
  rm youtubeuploader.tar.gz && \
  chmod +x /srv/youtube/youtubeuploader

# Install latest npm and node
RUN npm install npm@latest -g && \
  npm install n -g && \
  n latest

# Install unsilence
RUN pipx ensurepath && \
  pipx install unsilence

# Copy the application code
COPY --chown=admin . /srv

# Command to run the application
# 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 

CMD python -m uvicorn App.app:app --host 0.0.0.0 --port 7860 

# Expose port
EXPOSE 7860