Nepjune commited on
Commit
bea5597
·
verified ·
1 Parent(s): 0192143

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +50 -0
Dockerfile ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
32
+ USER user
33
+
34
+ EXPOSE 5000
35
+
36
+ ENV HOME=/home/user \
37
+ PATH=/home/user/.local/bin:$PATH
38
+
39
+
40
+ WORKDIR $HOME/app
41
+
42
+ # WORKDIR /app
43
+ COPY --from=builder /app/build ./static
44
+ COPY . .
45
+
46
+
47
+ CMD ["python", "app.py"]
48
+
49
+
50
+