Twan07 commited on
Commit
5bc5b77
·
verified ·
1 Parent(s): 0efa905

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -17
Dockerfile CHANGED
@@ -1,26 +1,31 @@
1
- # Sử dụng base image với Bun
2
  FROM oven/bun:latest
3
 
4
- # Thiết lập thư mục làm việc
5
- WORKDIR /app
 
 
 
 
 
 
6
 
7
- # Sao chép các tệp cần thiết
8
- COPY package.json bun.lock ./
9
- COPY . .
10
 
11
- # Cài đặt phụ thuộc với Bun
12
- RUN bun install
13
 
14
- # Nếu cần Python cho Hugging Face
15
- RUN apt-get update && \
16
- apt-get install -y python3 python3-pip && \
17
- pip3 install --no-cache-dir torch transformers
18
 
19
- # Sao chép nguồn
20
  COPY . .
21
 
22
- # Mở port (ví dụ: 3000)
23
- EXPOSE 3000
24
 
25
- # Lệnh chạy ứng dụng
26
- CMD ["bun", "index.ts"]
 
1
+ # Use official Bun base image
2
  FROM oven/bun:latest
3
 
4
+ # Install ffmpeg, curl, and build tools (including Python for native dependencies)
5
+ RUN apt-get update && apt-get install -y \
6
+ ffmpeg \
7
+ curl \
8
+ python3 \
9
+ python3-pip \
10
+ build-essential \
11
+ && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Install yt-dlp from GitHub release
14
+ RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp \
15
+ -o /usr/local/bin/yt-dlp && chmod a+rx /usr/local/bin/yt-dlp
16
 
17
+ # Set working directory
18
+ WORKDIR /app
19
 
20
+ # Copy bun.lockb and install dependencies with Bun
21
+ COPY bun.lockb .
22
+ RUN bun install --lockfile-only
 
23
 
24
+ # Copy the rest of the application
25
  COPY . .
26
 
27
+ # Expose port
28
+ EXPOSE 7860
29
 
30
+ # Command to run the app with Bun
31
+ CMD ["bun", "index.js"]