Spaces:
Runtime error
Runtime error
File size: 2,221 Bytes
a0f1951 873a252 083a8f0 f4821f9 083a8f0 a0f1951 44e9a12 51a81c7 a0f1951 44e9a12 ee59a81 a0f1951 ee59a81 a0f1951 50e7bcc ab8c941 682567c 246feb2 07e7101 d973af5 703974a b33aa40 6a7f87d 56ae92d 1ba6b5f b33aa40 68a9fcd a21d0c8 979722b a0e9b34 ecc8f2a 032195b 979722b 1040e3c a0f1951 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
FROM node:20-alpine AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY frontend .
RUN npm i
RUN npm run build
RUN ls -al
FROM python:3.10-slim AS backend
WORKDIR /app
COPY ./requirements.txt .
RUN rm -rf /var/cache/apk/* && \
rm -rf /root/.cache
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
RUN apk add --no-cache bash
EXPOSE 5000
WORKDIR /app
COPY --from=builder /app/build ./static
COPY . .
RUN mkdir -p /app/cache/hub/models--suno--bark/snapshots/70a8a7d34168586dc5d028fa9666aceade177992
RUN mkdir -p /app/cache/hub/models--suno--bark/blobs
RUN mkdir -p /app/cache/hub/models--suno--bark/refs/main
RUN mkdir -p /app/cache/hub/hub/models--suno--bark/blobs
RUN mkdir -p /app/cache/hub/hub/models--suno--bark/snapshots/70a8a7d34168586dc5d028fa9666aceade177992
RUN mkdir -p /app/cache/hub/hub/models--suno--bark/refs/main
# ตั้งค่าสิทธิ์ในไดเรกทอรี snapshots
RUN find /app/cache/hub/models--suno--bark/snapshots -type f -exec chmod u+rw {} \; \
&& find /app/cache/hub/models--suno--bark/snapshots -type d -exec chmod u+rwx {} \;
# ตั้งค่าสิทธิ์ในไดเรกทอรี blobs
RUN find /app/cache/hub/models--suno--bark/blobs -type f -exec chmod u+rw {} \; \
&& find /app/cache/hub/models--suno--bark/blobs -type d -exec chmod u+rwx {} \;
# ตั้งค่าสิทธิ์ในไดเรกทอรี refs/main
RUN find /app/cache/hub/models--suno--bark/refs/main -type f -exec chmod u+rw {} \; \
&& find /app/cache/hub/models--suno--bark/refs/main -type d -exec chmod u+rwx {} \;
# ตั้งค่าสิทธิ์ในไดเรกทอรี refs/main
RUN find /app/cache/hub/hub/models--suno--bark/refs/main -type f -exec chmod u+rw {} \; \
&& find /app/cache/hub/hub/models--suno--bark/refs/main -type d -exec chmod u+rwx {} \;
RUN chmod -R u+rwX /app/cache/hub
RUN chmod -R u+rwX /app/cache/hub/hub
RUN ls -al /app/cache/hub/
RUN ls -al /app/cache/hub/hub/models--suno--bark/refs/
ENV HF_HOME=/app/cache/hub/
ENV HF_HOME=/app/cache/hub/hub
CMD ["python", "app.py"]
|