Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
50bf4e9
Migrate video ingestion from Flask/Heroku to RunPod serverless with G…
mystixxx Mar 26, 2026
d9ebec3
fix deployment
mystixxx Mar 26, 2026
0289a6e
refactor(video): normalize job handling and propagate processing fail…
mystixxx Mar 26, 2026
fa392c2
Merge pull request #54 from e-dream-ai/runpod-migration
mystixxx Mar 26, 2026
721fc55
build on stage for now
mystixxx Mar 26, 2026
fe1c0ad
fix repo name
mystixxx Mar 26, 2026
2b52d65
refactor(edream): simplify client initialization by removing redundan…
mystixxx Mar 26, 2026
adb64fa
enhance(ffmpeg_utils): improve GPU video conversion by adding hwaccel…
mystixxx Mar 27, 2026
b6c0755
build(Dockerfile): add ffmpeg build stage and dependencies for GPU-ac…
mystixxx Mar 27, 2026
321998b
fix(ffmpeg_utils): remove unnecessary force_original_aspect_ratio fro…
mystixxx Mar 27, 2026
8505ef1
error show
mystixxx Mar 27, 2026
2a9c50c
fix(ffmpeg_utils): remove unnecessary pixel format specification from…
mystixxx Mar 27, 2026
0cf635d
build(Dockerfile): update FFmpeg version to 7.1.1 and modify video sc…
mystixxx Mar 27, 2026
7a30ddf
fix(ffmpeg_utils): update video scaling filter and add pixel format f…
mystixxx Mar 27, 2026
6b0e303
fix(ffmpeg_utils): replace video scaling filter with simpler syntax f…
mystixxx Mar 27, 2026
2162649
fix(ffmpeg_utils): add '-update' flag to thumbnail generation for imp…
mystixxx Mar 27, 2026
c4717fa
fix(ffmpeg_utils): add '-hwaccel cuda' option for GPU acceleration in…
mystixxx Mar 29, 2026
d8e1cd5
fix(ffmpeg_utils): replace '-vsync' with '-fps_mode' for improved fra…
mystixxx Mar 29, 2026
d8fea29
Create LICENSE
scottdraves Oct 24, 2025
21c6f10
build(Dockerfile): update CUDA version to 12.8.1 for improved perform…
mystixxx Mar 30, 2026
ea3000b
build(Dockerfile): upgrade CUDA version to 13.2.0
mystixxx Mar 30, 2026
62c7462
build(Dockerfile): update FFmpeg version to 8.1 and add nvcc flags fo…
mystixxx Mar 30, 2026
4e79136
build(Dockerfile): remove --enable-libnpp flag for streamlined FFmpeg…
mystixxx Mar 30, 2026
0672f11
go back to 12.8.0 cuda vesion cause of runpod drivers
mystixxx Mar 30, 2026
5001c1b
refactor(process_video): implement concurrent processing for video co…
mystixxx Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# APP SETTINGS
ENV=local
APP_SETTINGS=<app settings 'config.DevelopmentConfig' for development and 'config.ProductionConfig' for stage or alpha >

# BACKEND
BACKEND_URL=<backend url>
BACKEND_API_KEY=<backend apikey>

# API_KEY
API_KEY=<video ingestion apikey>

# Redis
REDISCLOUD_URL=<redis cloud url>

# Ssh key
SSH_KEY=<ssh key only for stage or alpha to install edream-sdk>
61 changes: 61 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and Push Docker Image

on:
push:
branches:
- main
- stage
workflow_dispatch:
inputs:
docker_tag:
required: false
default: ""
type: string

env:
REGISTRY: docker.io
IMAGE_NAME: edreamai/dream-ingestion

jobs:
build-and-push:
runs-on: container-builder

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Generate image metadata
id: meta
run: |
TIMESTAMP=$(date +%Y%m%d%H%M%S)
VERSION="${TIMESTAMP}"

TAG_SUFFIX="${{ github.event.inputs.docker_tag }}"
if [ -n "$TAG_SUFFIX" ]; then
VERSION="${VERSION}-${TAG_SUFFIX}"
fi

echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "image_tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${VERSION}" >> $GITHUB_OUTPUT
echo "latest_tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" >> $GITHUB_OUTPUT

- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ steps.meta.outputs.image_tag }}
${{ steps.meta.outputs.latest_tag }}
platforms: linux/amd64
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ flask.log
rq_worker.log

# python-api
python-api
python-api

# output
output/
87 changes: 87 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
FROM nvidia/cuda:12.8.0-cudnn-devel-ubuntu22.04 AS ffmpeg-builder

RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
yasm \
nasm \
git \
wget \
libx264-dev \
libx265-dev \
libnuma-dev \
libvpx-dev \
libfdk-aac-dev \
libmp3lame-dev \
libopus-dev \
libfreetype6-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git /tmp/nv-codec-headers && \
cd /tmp/nv-codec-headers && \
make install

RUN git clone --depth 1 --branch n8.1 https://github.com/FFmpeg/FFmpeg.git /tmp/ffmpeg && \
cd /tmp/ffmpeg && \
./configure \
--prefix=/usr/local \
--enable-gpl \
--enable-nonfree \
--enable-cuda-nvcc \
--enable-cuvid \
--enable-nvenc \
--enable-nvdec \
--enable-libx264 \
--enable-libx265 \
--enable-libvpx \
--enable-libfdk-aac \
--enable-libmp3lame \
--enable-libopus \
--enable-libfreetype \
--extra-cflags="-I/usr/local/cuda/include" \
--extra-ldflags="-L/usr/local/cuda/lib64" \
--nvccflags="-gencode arch=compute_75,code=sm_75 -O2" \
&& make -j$(nproc) \
&& make install

FROM nvidia/cuda:12.8.0-cudnn-runtime-ubuntu22.04

COPY --from=ffmpeg-builder /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
COPY --from=ffmpeg-builder /usr/local/bin/ffprobe /usr/local/bin/ffprobe
COPY --from=ffmpeg-builder /usr/local/lib/*.so* /usr/local/lib/

WORKDIR /app

RUN apt-get update && \
apt-get install -y --no-install-recommends \
imagemagick \
python3 \
python3-pip \
git \
libx264-163 \
libx265-199 \
libvpx7 \
libfdk-aac2 \
libmp3lame0 \
libopus0 \
libfreetype6 \
libnuma1 \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& ldconfig

COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt

COPY handler.py /app/handler.py
COPY clients/ /app/clients/
COPY utils/ /app/utils/
COPY constants/ /app/constants/

COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh

RUN mkdir -p /app/assets

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["python3", "-u", "/app/handler.py"]
Loading
Loading