Create Dockerfile
Browse files- Dockerfile +43 -0
Dockerfile
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM rendyprojects/python:latest
|
2 |
+
|
3 |
+
# Install necessary dependencies
|
4 |
+
RUN apt -qq update && \
|
5 |
+
apt -qq install -y --no-install-recommends \
|
6 |
+
ffmpeg \
|
7 |
+
curl \
|
8 |
+
git \
|
9 |
+
gnupg2 \
|
10 |
+
unzip \
|
11 |
+
wget \
|
12 |
+
python3-dev \
|
13 |
+
python3-pip \
|
14 |
+
libavformat-dev \
|
15 |
+
libavcodec-dev \
|
16 |
+
libavdevice-dev \
|
17 |
+
libavfilter-dev \
|
18 |
+
libavutil-dev \
|
19 |
+
libswscale-dev \
|
20 |
+
libswresample-dev \
|
21 |
+
neofetch && \
|
22 |
+
apt-get clean && \
|
23 |
+
rm -rf /var/lib/apt/lists/
|
24 |
+
|
25 |
+
WORKDIR /usr/src/app
|
26 |
+
|
27 |
+
# Copy application code and install Python dependencies
|
28 |
+
COPY . .
|
29 |
+
RUN pip3 install --upgrade pip setuptools==59.6.0
|
30 |
+
COPY requirements.txt .
|
31 |
+
RUN pip3 install -r requirements.txt
|
32 |
+
|
33 |
+
# Set permissions
|
34 |
+
RUN chown -R 1000:0 .
|
35 |
+
RUN chmod 777 .
|
36 |
+
RUN chown -R 1000:0 /usr
|
37 |
+
RUN chmod 777 /usr
|
38 |
+
|
39 |
+
# Expose the required port
|
40 |
+
EXPOSE 7860
|
41 |
+
|
42 |
+
# Run the application
|
43 |
+
CMD ["bash", "-c", "python3 server.py & python3 generator.py"]
|