normal dockerfile
Browse files- Dockerfile +51 -44
Dockerfile
CHANGED
@@ -1,63 +1,70 @@
|
|
1 |
# Builder stage
|
2 |
-
FROM python:3.10.0
|
3 |
|
4 |
-
|
5 |
-
RUN adduser -D admin
|
6 |
|
7 |
-
# Set the working directory and adjust permissions
|
8 |
WORKDIR /srv
|
9 |
-
RUN chown -R admin:admin /srv
|
10 |
-
|
11 |
-
|
12 |
-
# Install
|
13 |
-
RUN
|
14 |
-
libu2f-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
libxkbcommon \
|
37 |
-
libxrandr \
|
38 |
-
xdg-utils \
|
39 |
-
npm
|
40 |
|
41 |
# Copy the application code
|
42 |
COPY --chown=admin . /srv
|
43 |
|
44 |
-
#
|
|
|
|
|
|
|
|
|
45 |
RUN npm install npm@latest -g && \
|
46 |
npm install n -g && \
|
47 |
n latest
|
48 |
|
49 |
-
# Print Node.js and npm versions
|
50 |
-
RUN echo "Node.js version: $(node -v)" && \
|
51 |
-
echo "npm version: $(npm -v)"
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
# Install Python dependencies
|
56 |
COPY requirements.txt .
|
57 |
RUN pip install --no-cache-dir -r requirements.txt
|
58 |
|
59 |
-
# Application Run Command
|
60 |
-
CMD ["bash", "-c", "python -m uvicorn App.app:app --host 0.0.0.0 --port 7860 & python -m celery -A App.Worker.celery worker -c 4 --loglevel=info"]
|
61 |
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Builder stage
|
2 |
+
FROM python:3.10.0 as builder
|
3 |
|
4 |
+
RUN useradd -ms /bin/bash admin
|
|
|
5 |
|
|
|
6 |
WORKDIR /srv
|
7 |
+
RUN chown -R admin:admin /srv
|
8 |
+
RUN chmod -R 755 /srv
|
9 |
+
|
10 |
+
# Install dependencies
|
11 |
+
RUN apt-get update && \
|
12 |
+
apt-get install -y libu2f-udev libvulkan1 mesa-vulkan-drivers wget ffmpeg curl aria2
|
13 |
+
|
14 |
+
RUN apt-get install -y \
|
15 |
+
fonts-liberation \
|
16 |
+
libatk-bridge2.0-0 \
|
17 |
+
libatk1.0-0 \
|
18 |
+
libatspi2.0-0 \
|
19 |
+
libcups2 \
|
20 |
+
libdrm2 \
|
21 |
+
libgbm1 \
|
22 |
+
libgtk-3-0 \
|
23 |
+
libnspr4 \
|
24 |
+
libnss3 \
|
25 |
+
libu2f-udev \
|
26 |
+
libvulkan1 \
|
27 |
+
libxcomposite1 \
|
28 |
+
libxdamage1 \
|
29 |
+
libxfixes3 \
|
30 |
+
libasound2 \
|
31 |
+
libxkbcommon0 \
|
32 |
+
libxrandr2 \
|
33 |
+
xdg-utils
|
|
|
|
|
|
|
|
|
34 |
|
35 |
# Copy the application code
|
36 |
COPY --chown=admin . /srv
|
37 |
|
38 |
+
# Download and install Thorium Browser
|
39 |
+
|
40 |
+
RUN apt-get update && apt-get install -y \
|
41 |
+
software-properties-common \
|
42 |
+
npm
|
43 |
RUN npm install npm@latest -g && \
|
44 |
npm install n -g && \
|
45 |
n latest
|
46 |
|
|
|
|
|
|
|
47 |
|
48 |
+
|
49 |
+
RUN echo npm -v
|
50 |
+
RUN node -v
|
51 |
+
|
52 |
+
#install the stuff
|
53 |
+
# RUN cd /srv/Remotion-app && npm install
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
|
59 |
# Install Python dependencies
|
60 |
COPY requirements.txt .
|
61 |
RUN pip install --no-cache-dir -r requirements.txt
|
62 |
|
|
|
|
|
63 |
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
# Command to run the application
|
68 |
+
CMD python -m uvicorn App.app:app --host 0.0.0.0 --port 7860 & python -m celery -A App.Worker.celery worker -c 4 --loglevel=info
|
69 |
+
|
70 |
+
EXPOSE 7860
|