RomanArzumanyan / VALI

Video processing in Python
Apache License 2.0
36 stars 4 forks source link

how can I use it by docker? #23

Closed chenj133 closed 7 months ago

chenj133 commented 7 months ago

I use a dockerfile from VPF, but it don't work well, can you provide a usable dockerfile:

FROM nvcr.io/nvidia/tensorrt:22.12-py3
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
    apt-get -y install \
    libavfilter-dev \
    libavformat-dev \
    libavcodec-dev \
    libswresample-dev \
    libavutil-dev\
    wget \
    build-essential \
    ninja-build \
    cmake \
    git \
    python3 \
    python3-pip \
    python-is-python3

# Build vpf
RUN mkdir /src
WORKDIR /src
COPY src src
COPY setup.py setup.py
COPY pyproject.toml pyproject.toml
COPY CMakeLists.txt CMakeLists.txt
RUN python3 -m pip install --no-cache-dir .[torch]
WORKDIR /src/src/PytorchNvCodec
RUN python3 setup.py install

RUN mkdir /cwd
WORKDIR /cwd
RomanArzumanyan commented 7 months ago

Hi @chenj133

I can reproduce this issue on my side. Currently I'm working on fix, will update you a bit later.

chenj133 commented 7 months ago

I made a low-level mistake. I found that there was an extra FindFFmpeg.cmake file in your project root directory, which I added to the dockerfile. Then change the #include "libavcodec/bsf.h" in src/TC/inc/FFmpegDemux.h to

if HAS_BSF

include "libavcodec/bsf.h"

endif

There are some changes in the error message. I will continue to check.

RomanArzumanyan commented 7 months ago

@chenj133

Please check out issue_23_missing_dockerfile branch, it has Dockerfile added. I've tested on Ubuntu 22.04, works fine. CI tests are also OK. If it works on your machine, I'll merge to main.

chenj133 commented 7 months ago

thanks