File size: 895 Bytes
6c9014d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM rendyprojects/python:latest

# Install necessary dependencies
RUN apt -qq update && \
    apt -qq install -y --no-install-recommends \
    ffmpeg \
    curl \
    git \
    gnupg2 \
    unzip \
    wget \
    python3-dev \
    python3-pip \
    libavformat-dev \
    libavcodec-dev \
    libavdevice-dev \
    libavfilter-dev \
    libavutil-dev \
    libswscale-dev \
    libswresample-dev \
    neofetch && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/

WORKDIR /usr/src/app

# Copy application code and install Python dependencies
COPY . .
RUN pip3 install --upgrade pip setuptools==59.6.0
COPY requirements.txt .
RUN pip3 install -r requirements.txt

# Set permissions
RUN chown -R 1000:0 .
RUN chmod 777 .
RUN chown -R 1000:0 /usr
RUN chmod 777 /usr

# Expose the required port
EXPOSE 7860

# Run the application
CMD ["bash", "-c", "python3 server.py & python3 generator.py"]