-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bun just has too many issues with individual packages: - vitest (use bun test?) - prisma - react-router (as of latest testing) - inquirer - probably others that I'm forgetting
- Loading branch information
Showing
9 changed files
with
15,937 additions
and
2,739 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,51 +11,41 @@ RUN mkdir build | |
WORKDIR /home/build/audiowaveform/build | ||
RUN cmake -D BUILD_STATIC=1 .. && make | ||
|
||
# Prisma generate currently requires node | ||
# Temporal workers require node | ||
FROM oven/bun:1.1.42-slim AS bun-with-node | ||
RUN apt-get update && \ | ||
apt-get install -y curl ffmpeg git python3 python3-pip && \ | ||
mkdir -p /etc/apt/keyrings && \ | ||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ | ||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ | ||
apt-get update && \ | ||
apt-get install -y nodejs && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get clean | ||
|
||
# Debian Base Image currently required for Prisma and M1 Macs: https://github.com/prisma/prisma/issues/8478 | ||
# Temporal does not support alpine: https://github.com/temporalio/sdk-typescript/issues/850 | ||
FROM bun-with-node AS base | ||
FROM node:23.6.0-slim AS base | ||
# Prisma requires lbssl-dev and ca-certificates | ||
RUN apt-get update && apt-get install -y curl libssl-dev ca-certificates neovim | ||
COPY package.json bun.lock ./ | ||
RUN bun install | ||
WORKDIR /home/node/app | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
ENV NODE_ENV=production EDITOR=nvim | ||
COPY . . | ||
|
||
FROM base AS server | ||
RUN bun run prisma:generate | ||
CMD bun run start:server | ||
RUN npm run prisma:generate | ||
CMD npm run start:server | ||
|
||
FROM base AS background-worker | ||
RUN apt-get install -y curl imagemagick jpegoptim | ||
COPY --from=videah/oxipng:7.0.0 /usr/local/bin/oxipng /usr/local/bin/oxipng | ||
RUN bun run prisma:generate | ||
CMD bun run start:background-worker | ||
RUN npm run prisma:generate | ||
CMD npm run start:background-worker | ||
|
||
FROM base AS probe-worker | ||
RUN apt-get install -y ffmpeg | ||
CMD bun run start:probe-worker | ||
CMD npm run start:probe-worker | ||
|
||
FROM base AS transcode-worker | ||
RUN apt-get install -y imagemagick jpegoptim ffmpeg | ||
COPY --from=build-audiowaveform /home/build/audiowaveform/build/audiowaveform /usr/bin/ | ||
CMD bun run start:transcode-worker | ||
CMD npm run start:transcode-worker | ||
|
||
FROM nvidia/cuda:12.6.2-cudnn-runtime-ubuntu22.04 AS transcribe-worker | ||
ARG WHISPER_MODEL=tiny.en | ||
COPY --from=oven/bun:1.1.36-slim /usr/local/bin/bun /usr/local/bin/bun | ||
COPY --from=node:23.6.0-slim /usr/local/bin/node /usr/local/bin/ | ||
COPY --from=node:23.6.0-slim /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm | ||
RUN apt-get update && \ | ||
apt-get install -y ca-certificates curl gnupg python3 python3-pip git ffmpeg && \ | ||
mkdir -p /opt/whisper/models && \ | ||
|
@@ -68,15 +58,15 @@ RUN apt-get update && \ | |
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get clean && \ | ||
pip3 install git+https://github.com/Softcatala/[email protected] && mkdir -p /opt/whisper/models | ||
WORKDIR /home/bun/app | ||
COPY package.json bun.lock ./ | ||
RUN bun install | ||
WORKDIR /home/node/app | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
COPY . . | ||
ENV NODE_ENV=production | ||
CMD bun run start:transcribe-worker | ||
CMD npm run start:transcribe-worker | ||
|
||
FROM base AS import-worker | ||
RUN apt-get install -y python3 ffmpeg | ||
COPY --from=jauderho/yt-dlp:2025.01.15 /usr/local/bin/yt-dlp /usr/local/bin/yt-dlp | ||
RUN bun run prisma:generate | ||
CMD bun run start:import-worker | ||
RUN npm run prisma:generate | ||
CMD npm run start:import-worker |
Oops, something went wrong.