Last active
January 29, 2018 16:49
-
-
Save mitmul/2cd98788c07ebbae1815232a32f95728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:8.0-cudnn6-devel | |
RUN apt-get update -y && \ | |
apt-get install -y --no-install-recommends \ | |
python3-dev \ | |
python3-pip \ | |
python3-wheel \ | |
python3-setuptools \ | |
git \ | |
curl \ | |
cmake \ | |
cmake-curses-gui && \ | |
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* | |
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10 | |
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10 | |
RUN pip install --upgrade pip | |
RUN pip install numpy | |
WORKDIR /root | |
RUN curl -L -O https://github.com/opencv/opencv/archive/3.4.0.tar.gz && \ | |
tar zxvf 3.4.0.tar.gz && rm -rf 3.4.0.tar.gz && \ | |
cd opencv-3.4.0 && mkdir build && cd build && \ | |
cmake \ | |
-DBUILD_TESTS=OFF \ | |
-DBUILD_JPEG=OFF \ | |
-DENABLE_AVX=ON \ | |
-DENABLE_AVX2=ON \ | |
-DENABLE_FAST_MATH=ON \ | |
-DENABLE_NOISY_WARNINGS=ON \ | |
-DENABLE_SSE41=ON \ | |
-DENABLE_SSE42=ON \ | |
-DENABLE_SSSE3=ON \ | |
-DOPENCV_ENABLE_NONFREE=ON \ | |
-DBUILD_opencv_python3=ON \ | |
-DPYTHON3_EXECUTABLE=/usr/bin/python3 \ | |
-DPYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so \ | |
-DPYTHON3_LIBRARY_DEBUG=/usr/lib/x86_64-linux-gnu/libpython3.5m.so \ | |
-DPYTHON3_PACKAGES_PATH=/usr/lib/python3/dist-packages \ | |
-DPYTHON3_INCLUDE_DIR=/usr/include/python3.5m \ | |
-DPYTHON3_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python3.5m \ | |
-DWITH_OPENMP=ON \ | |
-DWITH_OPENCL=OFF \ | |
-DWITH_OPENCLAMDBLAS=OFF \ | |
-DWITH_OPENCLAMDFFT=OFF \ | |
-DWITH_OPENCL_SVM=OFF \ | |
-DWITH_1394=OFF \ | |
-DWITH_TBB=ON \ | |
-DWITH_JPEG=ON \ | |
-DHAVE_MKL=ON \ | |
-DMKL_WITH_OPENMP=ON \ | |
-DMKL_WITH_TBB=ON \ | |
-DBUILD_TIFF=ON \ | |
-DBUILD_CUDA_STUBS=OFF \ | |
-DBUILD_opencv_cudaarithm=OFF \ | |
-DBUILD_opencv_cudabgsegm=OFF \ | |
-DBUILD_opencv_cudacodec=OFF \ | |
-DBUILD_opencv_cudafeatures2d=OFF \ | |
-DBUILD_opencv_cudafilters=OFF \ | |
-DBUILD_opencv_cudaimgproc=OFF \ | |
-DBUILD_opencv_cudalegacy=OFF \ | |
-DBUILD_opencv_cudaobjdetect=OFF \ | |
-DBUILD_opencv_cudaoptflow=OFF \ | |
-DBUILD_opencv_cudastereo=OFF \ | |
-DBUILD_opencv_cudawarping=OFF \ | |
-DBUILD_opencv_cudev=OFF \ | |
-DWITH_CUDA=OFF \ | |
-DWITH_CUBLAS=OFF \ | |
-DWITH_CUFFT=OFF \ | |
-DWITH_FFMPEG=ON \ | |
-DINSTALL_PYTHON_EXAMPLES=ON \ | |
-DINSTALL_C_EXAMPLES=OFF \ | |
-DCMAKE_INSTALL_PREFIX=../install \ | |
../ && \ | |
make -j32 && make install | |
RUN pip install chainer --pre | |
RUN pip install cupy --pre | |
RUN pip install chainercv | |
RUN apt-get update -y && apt-get install -y gdb python3-dbg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build -t issue_2903 . | |
nvidia-docker run -ti --privileged --rm issue_2903 /bin/bash | |
# Then, inside of the container, run: | |
cd /root | |
git clone https://github.com/apple2373/chainer-train-stuck.git | |
cd chainer-train-stuck | |
# Get stucked!! | |
python train.py --gpu 0 --mode 0 | |
# OK | |
OMP_NUM_THREADS=1 python train.py --gpu 0 --mode 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment