Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker - Pytorch docker file - build issue #639

Closed
LakshmiKumar23 opened this issue Oct 1, 2021 · 3 comments
Closed

Docker - Pytorch docker file - build issue #639

LakshmiKumar23 opened this issue Oct 1, 2021 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@LakshmiKumar23
Copy link
Contributor

LakshmiKumar23 commented Oct 1, 2021

  • Fails to build FFMPEG under pytorch docker
git clone --recursive -b n4.0.4 https://git.ffmpeg.org/ffmpeg.git && cd ffmpeg && sudo ldconfig && \
        export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" && \
        ./configure --enable-shared --disable-static --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libass --enable-gpl --enable-nonfree && \
        make -j8 && sudo make install && cd
  • Need to build MIVisionX with cmake -DNEURAL_NET=OFF ../. Currently not implemented
@kiritigowda kiritigowda self-assigned this Oct 1, 2021
@kiritigowda kiritigowda added bug Something isn't working enhancement New feature or request labels Oct 1, 2021
@kiritigowda
Copy link
Collaborator

@LakshmiKumar23 - for the part about using -D-DNEURAL_NET=OFF in the docker script, the docker does not have miopen or any nn deps installed. So it will not be required -

https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/blob/1201c9d49c982be03dfa7a31571cc627f7d2065b/docker/pytorch/mivisionx-with-pytorch.dockerfile#L1

@kiritigowda
Copy link
Collaborator

@LakshmiKumar23 with #642 this issue should be resolved, please verify.

sudo docker build -f docker/pytorch/mivisionx-with-pytorch.dockerfile -t mivisionx-pytorch .
[sudo] password for kiriti: 
Sending build context to Docker daemon  320.1MB
Step 1/10 : FROM rocm/pytorch:latest
 ---> 6b8335f798a5
Step 2/10 : ENV MIVISIONX_DEPS_ROOT=/opt/mivisionx-deps
 ---> Using cache
 ---> 94f305996ed4
Step 3/10 : WORKDIR $MIVISIONX_DEPS_ROOT
 ---> Using cache
 ---> dca3306c8be1
Step 4/10 : RUN apt-get update -y
 ---> Using cache
 ---> 55b1362366e6
Step 5/10 : RUN apt-get -y install gcc g++ cmake git
 ---> Using cache
 ---> 4c61cfe67449
Step 6/10 : RUN apt-get -y install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy         libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev unzip &&         mkdir OpenCV && cd OpenCV && wget https://github.com/opencv/opencv/archive/3.4.0.zip && unzip 3.4.0.zip &&         mkdir build && cd build && cmake -DWITH_OPENCL=OFF ../opencv-3.4.0 && make -j8 && sudo make install && sudo ldconfig && cd
 ---> Using cache
 ---> 82a6f58390ce
Step 7/10 : RUN apt-get -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev         libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev         nasm yasm libx264-dev libx265-dev libnuma-dev libfdk-aac-dev &&         wget https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n4.0.4.zip && unzip n4.0.4.zip && cd FFmpeg-n4.0.4/ && sudo ldconfig &&         export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" &&         ./configure --enable-shared --disable-static --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libass --enable-gpl --enable-nonfree &&         make -j8 && sudo make install && cd
 ---> Using cache
 ---> c5c226e91204
Step 8/10 : RUN apt-get -y install libgflags-dev libgoogle-glog-dev liblmdb-dev nasm yasm libjsoncpp-dev clang &&         apt-get -y install libbz2-dev libssl-dev python-dev python3-dev autoconf automake libtool curl make g++ unzip &&         wget https://sourceforge.net/projects/half/files/half/1.12.0/half-1.12.0.zip &&         unzip half-1.12.0.zip -d half-files && sudo cp half-files/include/half.hpp /usr/local/include/ &&         git clone -b v3.12.0 https://github.com/protocolbuffers/protobuf.git && cd protobuf && git submodule update --init --recursive &&         ./autogen.sh && ./configure && make -j8 && make check -j8 && sudo make install && sudo ldconfig && cd &&         wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && tar xjvf boost_1_72_0.tar.bz2 &&         export CPLUS_INCLUDE_PATH=/usr/include/python3.6 && cd boost_1_72_0 &&         ./bootstrap.sh --prefix=/usr/local --with-python=python3 &&         ./b2 stage -j16 threading=multi link=shared cxxflags="-std=c++11" &&         sudo ./b2 install threading=multi link=shared --with-system --with-filesystem &&         ./b2 stage -j16 threading=multi link=static cxxflags="-std=c++11 -fpic" cflags="-fpic" &&         sudo ./b2 install threading=multi link=static --with-system --with-filesystem && cd ../ &&         git clone -b 2.0.6.1 https://github.com/rrawther/libjpeg-turbo.git && cd libjpeg-turbo && mkdir build && cd build &&         cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.3         -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ../ && make -j4 && sudo make install && cd ../../ &&         git clone -b 0.7  https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build &&         cmake -DBACKEND=OCL ../ && make -j4 && sudo make install && cd
 ---> Using cache
 ---> 5f6f3464d2d3
Step 9/10 : WORKDIR /workspace
 ---> Using cache
 ---> 1ff42840d737
Step 10/10 : RUN git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX.git && mkdir build && cd build &&         cmake ../MIVisionX && make -j8 && sudo make install && cd
 ---> Using cache
 ---> d9d0eeada51f
Successfully built d9d0eeada51f
Successfully tagged mivisionx-pytorch:latest

@kiritigowda
Copy link
Collaborator

PR #642 merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants