Mbonea commited on
Commit
f781fe7
1 Parent(s): a4bcb74

normal dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +51 -44
Dockerfile CHANGED
@@ -1,63 +1,70 @@
1
  # Builder stage
2
- FROM python:3.10.0-alpine as builder
3
 
4
- # Create a non-root user
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
- chmod -R 755 /srv
11
-
12
- # Install system dependencies
13
- RUN apk --no-cache add \
14
- libu2f-dev \
15
- vulkan-tools \
16
- mesa-vulkan-radeon \
17
- wget \
18
- ffmpeg \
19
- curl \
20
- aria2 \
21
- ttf-liberation \
22
- at-spi2-atk \
23
- atk \
24
- cups-libs \
25
- libdrm \
26
- libgbm \
27
- gtk3 \
28
- nspr \
29
- nss \
30
- libu2f-host \
31
- vulkan-loader \
32
- libxcomposite \
33
- libxdamage \
34
- libxfixes \
35
- alsa-lib \
36
- libxkbcommon \
37
- libxrandr \
38
- xdg-utils \
39
- npm
40
 
41
  # Copy the application code
42
  COPY --chown=admin . /srv
43
 
44
- # Install Node.js and npm
 
 
 
 
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
- # Install Thorium Browser or other dependencies if needed
 
 
 
 
 
 
 
 
 
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
- # Expose ports
63
- EXPOSE 7860
 
 
 
 
 
 
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