Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +18 -43
Dockerfile
CHANGED
@@ -10,61 +10,36 @@ RUN npm run build
|
|
10 |
RUN ls -al
|
11 |
|
12 |
FROM python:3.10-slim AS backend
|
13 |
-
|
14 |
-
RUN useradd -m -u 1000 user
|
15 |
-
USER user
|
16 |
-
|
17 |
WORKDIR /app
|
18 |
|
19 |
-
RUN
|
|
|
|
|
20 |
|
21 |
-
|
22 |
|
|
|
23 |
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
24 |
|
25 |
-
|
26 |
|
27 |
EXPOSE 5000
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
COPY --from=builder /app/build ./static
|
31 |
COPY . .
|
32 |
|
33 |
-
# RUN
|
34 |
-
|
35 |
-
# RUN
|
36 |
-
|
37 |
-
#
|
38 |
-
# RUN mkdir -p /app/cache/hub/hub/models--suno--bark/refs/main
|
39 |
-
# RUN mkdir -p /app/cache/hub/hub/hub/models--suno--bark/blobs
|
40 |
-
# RUN mkdir -p /app/cache/hub/hub/hub/models--suno--bark/snapshots/70a8a7d34168586dc5d028fa9666aceade177992
|
41 |
-
# RUN mkdir -p /app/cache/hub/hub/hub/models--suno--bark/refs/main
|
42 |
-
|
43 |
-
# # ตั้งค่าสิทธิ์ในไดเรกทอรี snapshots
|
44 |
-
# RUN find /app/cache/hub/models--suno--bark/snapshots -type f -exec chmod u+rw {} \; \
|
45 |
-
# && find /app/cache/hub/models--suno--bark/snapshots -type d -exec chmod u+rwx {} \;
|
46 |
-
|
47 |
-
# # ตั้งค่าสิทธิ์ในไดเรกทอรี blobs
|
48 |
-
# RUN find /app/cache/hub/models--suno--bark/blobs -type f -exec chmod u+rw {} \; \
|
49 |
-
# && find /app/cache/hub/models--suno--bark/blobs -type d -exec chmod u+rwx {} \;
|
50 |
-
|
51 |
-
# # ตั้งค่าสิทธิ์ในไดเรกทอรี refs/main
|
52 |
-
# RUN find /app/cache/hub/models--suno--bark/refs/main -type f -exec chmod u+rw {} \; \
|
53 |
-
# && find /app/cache/hub/models--suno--bark/refs/main -type d -exec chmod u+rwx {} \;
|
54 |
-
|
55 |
-
# # ตั้งค่าสิทธิ์ในไดเรกทอรี refs/main
|
56 |
-
# RUN find /app/cache/hub/hub/models--suno--bark/refs/main -type f -exec chmod u+rw {} \; \
|
57 |
-
# && find /app/cache/hub/hub/models--suno--bark/refs/main -type d -exec chmod u+rwx {} \;
|
58 |
-
|
59 |
-
# # ตั้งค่าสิทธิ์ในไดเรกทอรี refs/main
|
60 |
-
# RUN find /app/cache/hub/hub/hub/models--suno--bark/refs/main -type f -exec chmod u+rw {} \; \
|
61 |
-
# && find /app/cache/hub/hub/hub/models--suno--bark/refs/main -type d -exec chmod u+rwx {} \;
|
62 |
-
|
63 |
-
RUN chmod -R u+rwX /app/cache/hub
|
64 |
-
|
65 |
-
RUN ls -al /app/cache/hub/
|
66 |
-
|
67 |
-
ENV HF_HOME=/app/cache/hub/
|
68 |
|
69 |
CMD ["python", "app.py"]
|
70 |
|
|
|
10 |
RUN ls -al
|
11 |
|
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
|
25 |
|
26 |
EXPOSE 5000
|
27 |
|
28 |
+
ENV HOME=/home/user \
|
29 |
+
PATH=/home/user/.local/bin:$PATH
|
30 |
+
|
31 |
+
|
32 |
+
WORKDIR $HOME/app
|
33 |
+
|
34 |
+
# WORKDIR /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 |
|