Natthathida commited on
Commit
83a6098
·
verified ·
1 Parent(s): 89c21f2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -9
Dockerfile CHANGED
@@ -12,13 +12,22 @@ RUN ls -al
12
  FROM python:3.10-slim AS backend
13
  WORKDIR /app
14
 
15
- RUN apt-get update && apt-get install --no-install-recommends -y \
16
- git ffmpeg curl gnupg \
17
- && apt-get clean && rm -rf /var/lib/apt/lists/*
18
 
19
- RUN useradd -m -u 1000 user
 
 
 
 
 
 
 
 
20
 
21
  COPY ./requirements.txt .
 
22
  RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
23
 
24
  USER user
@@ -35,11 +44,6 @@ WORKDIR $HOME/app
35
  COPY --from=builder /app/build ./static
36
  COPY . .
37
 
38
- # RUN chmod -R u+rwX /app/cache/hub
39
-
40
- # RUN ls -al /app/cache/hub/
41
-
42
- # ENV HF_HOME=/app/cache/hub/
43
 
44
  CMD ["python", "app.py"]
45
 
 
12
  FROM python:3.10-slim AS backend
13
  WORKDIR /app
14
 
15
+ # RUN apt-get update && apt-get install --no-install-recommends -y \
16
+ # git ffmpeg curl gnupg \
17
+ # && apt-get clean && rm -rf /var/lib/apt/lists/*
18
 
19
+ # RUN useradd -m -u 1000 user
20
+
21
+ RUN apk update && apk add --no-cache \
22
+ git \
23
+ ffmpeg \
24
+ curl \
25
+ gnupg
26
+
27
+ RUN adduser -D -u 1000 user
28
 
29
  COPY ./requirements.txt .
30
+ RUN pip install torch transformers -U
31
  RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
32
 
33
  USER user
 
44
  COPY --from=builder /app/build ./static
45
  COPY . .
46
 
 
 
 
 
 
47
 
48
  CMD ["python", "app.py"]
49