Nepjune commited on
Commit
a230aa9
·
verified ·
1 Parent(s): 022bdf5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +45 -0
Dockerfile ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:20-alpine AS builder
2
+ RUN apk add --no-cache libc6-compat
3
+ WORKDIR /app
4
+
5
+ # Install dependencies based on the preferred package manager
6
+ COPY frontend .
7
+
8
+ RUN npm i
9
+ RUN npm run build
10
+ RUN ls -al
11
+
12
+ FROM python:3.10-slim AS backend
13
+ WORKDIR /app
14
+
15
+ RUN useradd -m -u 1000 user
16
+ # RUN apt-get update && apt-get install --no-install-recommends -y \
17
+ # git ffmpeg curl gnupg \
18
+ # && apt-get clean && rm -rf /var/lib/apt/lists/*
19
+
20
+ # RUN useradd -m -u 1000 user
21
+
22
+ RUN apt-get update && apt-get install --no-install-recommends -y \
23
+ git \
24
+ ffmpeg \
25
+ curl \
26
+ gnupg
27
+
28
+ COPY ./requirements.txt .
29
+ # RUN pip install torch transformers -U
30
+ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
31
+ USER user
32
+ EXPOSE 5000
33
+
34
+ ENV HOME=/home/user \
35
+ PATH=/home/user/.local/bin:$PATH
36
+
37
+
38
+ WORKDIR $HOME/app
39
+
40
+ # WORKDIR /app
41
+ COPY --from=builder /app/build ./static
42
+ COPY . .
43
+
44
+
45
+ CMD ["python", "app.py"]