mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-12 01:36:20 +02:00
feat: Switch Dockerfile base image to NVIDIA CUDA, install Dart SDK, and add NVENC-enabled FFmpeg.
This commit is contained in:
1 parent
ce82b9e824
commit
c77b100a4e
1 file changed
+25
-3
+25
-3
@@ -44,12 +44,34 @@ RUN flutter build web --release --base-href="/" --no-wasm-dry-run --no-tree-shak
|
||||
# ============================================
|
||||
# Stage 2: Serve with custom Dart server (with API proxy)
|
||||
# ============================================
|
||||
FROM dart:stable
|
||||
# Use NVIDIA CUDA base image for GPU support
|
||||
FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04
|
||||
|
||||
# Install Dart SDK
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apt-transport-https \
|
||||
wget \
|
||||
gnupg \
|
||||
&& wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/dart.gpg \
|
||||
&& echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | tee /etc/apt/sources.list.d/dart_stable.list \
|
||||
&& apt-get update && apt-get install -y dart \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH="/usr/lib/dart/bin:$PATH"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install SQLite3 library for FFI and FFmpeg for IPTV stream transcoding
|
||||
RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev ffmpeg && rm -rf /var/lib/apt/lists/*
|
||||
# Install SQLite3 library for FFI
|
||||
RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install FFmpeg with NVIDIA NVENC support (static build from johnvansickle.com)
|
||||
RUN apt-get update && apt-get install -y xz-utils \
|
||||
&& wget -q https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz \
|
||||
&& tar xf ffmpeg-release-amd64-static.tar.xz \
|
||||
&& mv ffmpeg-*-amd64-static/ffmpeg /usr/local/bin/ \
|
||||
&& mv ffmpeg-*-amd64-static/ffprobe /usr/local/bin/ \
|
||||
&& rm -rf ffmpeg-* \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create directory for HLS stream output
|
||||
RUN mkdir -p /tmp/streams && chmod 777 /tmp/streams
|
||||
|
||||
Reference in new issue
Block a user