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

nothing happens on Docker #21

Closed
kidapu opened this issue Mar 6, 2017 · 4 comments
Closed

nothing happens on Docker #21

kidapu opened this issue Mar 6, 2017 · 4 comments

Comments

@kidapu
Copy link

kidapu commented Mar 6, 2017

I have compiled caffe_rtpose successfully on my following enviroment.

  • using nvidia-docker
  • ubuntu 16.04
  • cuda 8.0
  • cudnn 5.1.10
  • opencv 3.1

This enviroment is built with following Dockerfile.

FROM nvidia/cuda:8.0-devel-ubuntu16.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"

RUN mkdir OpenCV && cd OpenCV

RUN apt-get update && apt-get install -y \
  build-essential \
  checkinstall \
  cmake \
  pkg-config \
  yasm \
  libtiff5-dev \
  libjpeg-dev \
  libjasper-dev \
  libavcodec-dev \
  libavformat-dev \
  libswscale-dev \
  libdc1394-22-dev \
  libgstreamer0.10-dev \
  libgstreamer-plugins-base0.10-dev \
  libv4l-dev \
  python-dev \
  python-numpy \
  python-pip \
  libtbb-dev \
  libeigen3-dev \
  libqt4-dev \
  libgtk2.0-dev \
  # Doesn't work libfaac-dev \
  libmp3lame-dev \
  libopencore-amrnb-dev \
  libopencore-amrwb-dev \
  libtheora-dev \
  libvorbis-dev \
  libxvidcore-dev \
  x264 \ 
  v4l-utils \
  libgtk2.0-dev \
  unzip \
  libhdf5-dev \
  wget \
  curl \
  sudo \
  git \
  vim \
  lsb-release \
  libopenblas-dev \
  libatlas-base-dev \
  libgflags-dev \
  libgoogle-glog-dev \
  liblmdb-dev


ENV CUDNN_VERSION 5.1.10
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN CUDNN_DOWNLOAD_SUM=c10719b36f2dd6e9ddc63e3189affaa1a94d7d027e63b71c3f64d449ab0645ce && \
    curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz -O && \
    echo "$CUDNN_DOWNLOAD_SUM  cudnn-8.0-linux-x64-v5.1.tgz" | sha256sum -c --strict - && \
    tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C /usr/local && \
    rm cudnn-8.0-linux-x64-v5.1.tgz && \
    ldconfig


RUN cd /opt && \
  wget https://github.com/daveselinger/opencv/archive/3.1.0-with-cuda8.zip -O opencv-3.1.0.zip -nv && \
  unzip opencv-3.1.0.zip && \
  mv opencv-3.1.0-with-cuda8 opencv-3.1.0 && \
  cd opencv-3.1.0 && \
  rm -rf build && \
  mkdir build && \
  cd build && \
  cmake -D CUDA_ARCH_BIN=3.2 \
    -D CUDA_ARCH_PTX=3.2 \
    -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D WITH_TBB=ON \
    -D BUILD_NEW_PYTHON_SUPPORT=ON \
    -D WITH_V4L=ON \
    -D BUILD_TIFF=ON \
    -D WITH_QT=ON \
    -D ENABLE_PRECOMPILED_HEADERS=OFF \
    -D WITH_OPENGL=ON .. && \
  make -j4 && \
  make install && \
  echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/opencv.conf && \
  ldconfig
RUN cp /opt/opencv-3.1.0/build/lib/cv2.so /usr/lib/python2.7/dist-packages/cv2.so

I confirmed this docker container can use webcam and GUI, and I try to run following command, but nothing happens... X(

$ ./build/examples/rtpose/rtpose.bin 
init done 
opengl support available 

$ ./build/examples/rtpose/rtpose.bin --video ./build/examples/rtpose/test.mp4 --num_gpu 1 --write_frames output/
init done 
opengl support available 
@gineshidalgo99
Copy link
Member

Please, check #1 or #7. Thanks!

@kidapu
Copy link
Author

kidapu commented Mar 8, 2017

@gineshidalgo99
Thanks.
I changed opencv version from 3.1 to 2.4.13.2.
Then I got new event like below youtube link, that I recorded my ubuntu desktop...

https://www.youtube.com/watch?v=2HmNaGgW2Xk&feature=youtu.be

The window opens, but it will die soon...

@gineshidalgo99
Copy link
Member

gineshidalgo99 commented Mar 8, 2017

We are still trying to figure out that error, since it does not happen in our computers.

Could you try this? Could you remove your OpenCV version and try the default and basic OpenCV version that you can get from the Ubuntu repositories?
sudo apt-get install libopencv-dev

And let us know whether the error still happens.

Thanks!

@kidapu
Copy link
Author

kidapu commented Mar 8, 2017

I cannot instal libopencv but I can install libopencv-dev alternatively, and finally I can success to run!

Following Dockerfile could run your app. ( Probably there are unnecessary libraries included but hastening ...)

FROM nvidia/cuda:8.0-devel-ubuntu16.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"

RUN apt-get update && apt-get install -y \
  build-essential checkinstall cmake pkg-config wget curl sudo git vim unzip lsb-release \
  yasm x264 \ 
  libtiff5-dev libjpeg-dev libpng-dev libtiff-dev \
  libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev \
  python-dev python-numpy python-pip \
  libtbb-dev libeigen3-dev libqt4-dev libgtk2.0-dev libmp3lame-dev \
  libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev \
  v4l-utils \
  libgtk2.0-dev \
  zlib1g-dev \
  libhdf5-dev libopenblas-dev libatlas-base-dev libgflags-dev libgoogle-glog-dev liblmdb-dev liblapacke-dev \
  libopencv-dev python-opencv 


# install cudnn 5.1.10
ENV CUDNN_VERSION 5.1.10
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN CUDNN_DOWNLOAD_SUM=c10719b36f2dd6e9ddc63e3189affaa1a94d7d027e63b71c3f64d449ab0645ce && \
    curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz -O && \
    echo "$CUDNN_DOWNLOAD_SUM  cudnn-8.0-linux-x64-v5.1.tgz" | sha256sum -c --strict - && \
    tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C /usr/local && \
    rm cudnn-8.0-linux-x64-v5.1.tgz && \
    ldconfig


# install rtpose
RUN cd /usr/local && \
    git clone https://github.com/CMU-Perceptual-Computing-Lab/caffe_rtpose.git && \
    cd caffe_rtpose && \
    ./install_caffe_and_cpm.sh

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants