Update Dockerfile
Browse files- Dockerfile +22 -17
Dockerfile
CHANGED
|
@@ -1,26 +1,31 @@
|
|
| 1 |
-
#
|
| 2 |
FROM oven/bun:latest
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
pip3 install --no-cache-dir torch transformers
|
| 18 |
|
| 19 |
-
#
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
EXPOSE
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
CMD ["bun", "index.
|
|
|
|
| 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"]
|