fp/services/our/Dockerfile
CJ_Clippy addba64df5
Some checks failed
ci / test (push) Failing after 6m18s
ci / build (push) Successful in 1m21s
fix wget usage error
2025-08-15 10:21:50 -08:00

68 lines
2.0 KiB
Docker

FROM node:22
# Set working directory
WORKDIR /app
# Install system-level dependencies
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
git \
inotify-tools \
ffmpeg \
mktorrent \
python3 \
python3-pip \
python3-venv \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Shaka Packager
RUN wget -q https://github.com/shaka-project/shaka-packager/releases/download/v3.4.2/packager-linux-x64 \
-O /usr/local/bin/packager \
&& chmod +x /usr/local/bin/packager \
&& packager --version
# Install IPFS Kubo
COPY --from=ipfs/kubo:v0.36.0 /usr/local/bin/ipfs /usr/local/bin/ipfs
RUN ipfs init
# Bundle the vibeui pytorch model
RUN mkdir -p /app/vibeui \
&& wget -q https://gitea.futureporn.net/futureporn/fp/raw/branch/main/apps/vibeui/public/vibeui.pt -O /app/vibeui/vibeui.pt \
&& wget -q https://gitea.futureporn.net/futureporn/fp/raw/branch/main/apps/vibeui/public/data.yaml -O /app/vibeui/data.yaml
# Install openwhisper
COPY --from=ghcr.io/ggml-org/whisper.cpp:main-e7bf0294ec9099b5fc21f5ba969805dfb2108cea /app /app/whisper.cpp
ENV PATH="$PATH:/app/whisper.cpp/build/bin"
ENV LD_LIBRARY_PATH="/app/whisper.cpp/build/src:/app/whisper.cpp/build/ggml/src:/usr/local/lib:/usr/lib"
# Install b2-cli
RUN wget https://github.com/Backblaze/B2_Command_Line_Tool/releases/download/v4.4.1/b2-linux -O /usr/local/bin/b2 && chmod +x /usr/local/bin/b2
# Copy and install dependencies
COPY package.json package-lock.json ./
RUN npm install --ignore-scripts=false --foreground-scripts --verbose
# Copy Prisma schema and generate client
COPY prisma ./prisma
RUN npx prisma generate
# Copy the rest of the code
COPY . .
# Build the app
RUN npm run build
# Setup Python virtualenv
RUN python3 -m venv /app/venv
ENV PATH="/app/venv/bin:$PATH"
# Install torrentfile & other python deps
RUN ./venv/bin/pip install --no-cache-dir -r requirements.txt
# Expose the port
EXPOSE 5000
# Start the app
CMD ["npm", "run", "start:server"]