File size: 1,283 Bytes
95a7280
5eb9e8b
95a7280
838e5c7
95a7280
 
838e5c7
 
 
 
95a7280
913f408
 
838e5c7
 
 
 
 
 
 
 
 
 
 
 
c1500c2
95a7280
838e5c7
95a7280
 
fa7dd75
a9f9428
 
 
838e5c7
2f65bcc
 
838e5c7
ec47a3c
88b7f59
2f65bcc
7a7ed9d
 
0978387
97d31bc
0978387
 
 
 
 
838e5c7
c4ed5be
838e5c7
 
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
# Builder stage
FROM python:3.10.0 as builder

RUN useradd -ms /bin/bash admin

WORKDIR /srv
RUN chown -R admin:admin /srv
RUN chmod 755 /srv



RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    aria2 ffmpeg     libgl1-mesa-dev \
    libgles2-mesa-dev \
    libglu1-mesa-dev \
    build-essential \
    cmake \
    freeglut3-dev \
    libglfw3-dev \
    libglew-dev \
    libsdl2-dev \
    libjpeg-dev \
    libpng-dev \
    libfreetype6-dev \
    && rm -rf /var/lib/apt/lists/*

#copy requirements    
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN  apt-get update && apt-get install -y \
    tesseract-ocr \
    libtesseract-dev
RUN pip install pytesseract 

# Copy the application code
USER admin



COPY --chown=admin . /srv
USER root
RUN chown -R admin:admin /srv
# Install youtubeuploader
ADD https://github.com/porjo/youtubeuploader/releases/download/v1.24.4/youtubeuploader_1.24.4_Linux_amd64.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

# Command to run the application
CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 1
# Expose the server port
EXPOSE 7860