Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
yosuke committed Dec 16, 2020
0 parents commit 4ea471a
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .devrt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
simulations:
- name: wrschallenge
type: challenge
to: wrs2020-robocup
65 changes: 65 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
FROM ros:melodic

ENV CUDA_VERSION 10.1.105
ENV CUDA_PKG_VERSION 10-1=$CUDA_VERSION-1
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,graphics
ENV NVIDIA_REQUIRE_CUDA "cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419"
ENV NCCL_VERSION 2.4.8
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs
ENV CUDNN_VERSION 7.6.5.32

RUN apt-get update && apt-get install -y curl

RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg2 curl ca-certificates && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list

RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-cudart-$CUDA_PKG_VERSION \
cuda-compat-10-1 \
&& ln -s cuda-10.1 /usr/local/cuda

RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf

RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-libraries-$CUDA_PKG_VERSION \
cuda-npp-$CUDA_PKG_VERSION \
cuda-nvtx-$CUDA_PKG_VERSION \
libcublas10=10.2.1.243-1 \
libnccl2=$NCCL_VERSION-1+cuda10.1 \
&& apt-mark hold libnccl2

RUN apt-mark hold libcublas10

RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-nvml-dev-$CUDA_PKG_VERSION \
cuda-command-line-tools-$CUDA_PKG_VERSION \
cuda-nvprof-$CUDA_PKG_VERSION \
cuda-npp-dev-$CUDA_PKG_VERSION \
cuda-libraries-dev-$CUDA_PKG_VERSION \
cuda-minimal-build-$CUDA_PKG_VERSION \
libcublas-dev=10.2.1.243-1 \
libnccl-dev=2.4.8-1+cuda10.1 \
&& apt-mark hold libnccl-dev

RUN apt-mark hold libcublas-dev

LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"

RUN apt-get update && apt-get install -y --no-install-recommends libcudnn7=$CUDNN_VERSION-1+cuda10.1 libcudnn7-dev=$CUDNN_VERSION-1+cuda10.1 && apt-mark hold libcudnn7

RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python2 get-pip.py && rm get-pip.py && pip install -U pip

SHELL ["/bin/bash", "-c"]

RUN source ~/.bashrc && pip install -U cupy-cuda101==6.0.0 chainer==6.0.0 chainercv

COPY test.py /test.py

CMD python /test.py
3 changes: 3 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import cupy

print cupy.__version__

8 comments on commit 4ea471a

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Your commit has been accepted to devrt build system...

simulations:
  - name: wrschallenge
    type: challenge
    to: wrs2020-robocup

Accept your challenge to: WRS2020 RoboCup challenge πŸ†

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Clone success:

.
β”œβ”€β”€ [  80]  .devrt.yml
β”œβ”€β”€ [2.5K]  Dockerfile
└── [  36]  test.py

0 directories, 3 files

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Build success:

  Downloading typing_extensions-3.7.4.3-py2-none-any.whl (9.3 kB)
Collecting Pillow
  Downloading Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl (2.1 MB)
Building wheels for collected packages: chainer, chainercv, filelock
  Building wheel for chainer (setup.py): started
  Building wheel for chainer (setup.py): finished with status 'done'
  Created wheel for chainer: filename=chainer-6.0.0-py2-none-any.whl size=876770 sha256=af920b434447e69280f70dfc71a5becdd82d9f30b75aa3862ca9c112dfae0a45
  Stored in directory: /root/.cache/pip/wheels/01/c4/9d/f91462e7dedb0c99a34f43891375c74065a86319afb88464c7
  Building wheel for chainercv (setup.py): started
  Building wheel for chainercv (setup.py): finished with status 'done'
  Created wheel for chainercv: filename=chainercv-0.13.1-cp27-cp27mu-linux_x86_64.whl size=525660 sha256=a6ec4b8f43a4e2c52869c525613e5cafa6f36c581500585b43f60dcb178c7fb4
  Stored in directory: /root/.cache/pip/wheels/fd/32/30/e80f2eb8813775f7b963fc093103b3b829fda16215800fdfde
  Building wheel for filelock (setup.py): started
  Building wheel for filelock (setup.py): finished with status 'done'
  Created wheel for filelock: filename=filelock-3.0.12-py2-none-any.whl size=7576 sha256=32b102c549898753d46e688abb98fdf534fca18f8f545376cde14386b200979e
  Stored in directory: /root/.cache/pip/wheels/b9/91/23/b559c1f4fd55056712b3a71cd9cab1dc0089e2232d502ed72e
Successfully built chainer chainercv filelock
Installing collected packages: fastrlock, cupy-cuda101, filelock, protobuf, typing, typing-extensions, chainer, Pillow, chainercv
Successfully installed Pillow-6.2.2 chainer-6.0.0 chainercv-0.13.1 cupy-cuda101-6.0.0 fastrlock-0.5 filelock-3.0.12 protobuf-3.7.1 typing-3.7.4.3 typing-extensions-3.7.4.3
Removing intermediate container 2a3929edd22d
 ---> e667da1f0e37
Step 25/26 : COPY test.py /test.py
 ---> 3b0ecb729cbb
Step 26/26 : CMD python /test.py
 ---> Running in 4892f11a073a
Removing intermediate container 4892f11a073a
 ---> da43011065e0
Successfully built da43011065e0
Successfully tagged yosuke-test-cupy-4ea471a5013a57efc4111f86a7b1beaedd3122c9:latest

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Simulation finished:
score: 0
time: 6.693 [sec]
screen
Click here for high quality video

Traceback (most recent call last):
  File "/test.py", line 1, in <module>
    import cupy
  File "/usr/local/lib/python2.7/dist-packages/cupy/__init__.py", line 32, in <module>
    six.reraise(ImportError, ImportError(msg), exc_info[2])
  File "/usr/local/lib/python2.7/dist-packages/cupy/__init__.py", line 11, in <module>
    from cupy import core  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/cupy/core/__init__.py", line 1, in <module>
    from cupy.core import core  # NOQA
ImportError: CuPy is not correctly installed.

If you are using wheel distribution (cupy-cudaXX), make sure that the version of CuPy you installed matches with the version of CUDA on your host.
Also, confirm that only one CuPy package is installed:
  $ pip freeze

If you are building CuPy from source, please check your environment, uninstall CuPy and reinstall it with:
  $ pip install cupy --no-cache-dir -vvvv

Check the Installation Guide for details:
  https://docs-cupy.chainer.org/en/latest/install.html

original error: libcuda.so.1: cannot open shared object file: No such file or directory

Full log

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Your commit has been accepted to devrt build system...

simulations:
  - name: wrschallenge
    type: challenge
    to: wrs2020-robocup

Accept your challenge to: WRS2020 RoboCup challenge πŸ†

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Clone success:

.
β”œβ”€β”€ [  80]  .devrt.yml
β”œβ”€β”€ [2.5K]  Dockerfile
└── [  36]  test.py

0 directories, 3 files

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Build success:

  Downloading typing_extensions-3.7.4.3-py2-none-any.whl (9.3 kB)
Collecting Pillow
  Downloading Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl (2.1 MB)
Building wheels for collected packages: chainer, chainercv, filelock
  Building wheel for chainer (setup.py): started
  Building wheel for chainer (setup.py): finished with status 'done'
  Created wheel for chainer: filename=chainer-6.0.0-py2-none-any.whl size=876770 sha256=d9cefc1522d7745392c6c0d20eb81f0400986534ee09a4b408e91e6d14e6c06f
  Stored in directory: /root/.cache/pip/wheels/01/c4/9d/f91462e7dedb0c99a34f43891375c74065a86319afb88464c7
  Building wheel for chainercv (setup.py): started
  Building wheel for chainercv (setup.py): finished with status 'done'
  Created wheel for chainercv: filename=chainercv-0.13.1-cp27-cp27mu-linux_x86_64.whl size=525669 sha256=fe670f94243c1a9d8ab8678f093b61e1fa115c08c9b569d884bbe51feea86f70
  Stored in directory: /root/.cache/pip/wheels/fd/32/30/e80f2eb8813775f7b963fc093103b3b829fda16215800fdfde
  Building wheel for filelock (setup.py): started
  Building wheel for filelock (setup.py): finished with status 'done'
  Created wheel for filelock: filename=filelock-3.0.12-py2-none-any.whl size=7576 sha256=f5ce44e91cf1615949a16ed599fa51f0910058340bec3feba98fc61936bfb36c
  Stored in directory: /root/.cache/pip/wheels/b9/91/23/b559c1f4fd55056712b3a71cd9cab1dc0089e2232d502ed72e
Successfully built chainer chainercv filelock
Installing collected packages: fastrlock, cupy-cuda101, filelock, protobuf, typing, typing-extensions, chainer, Pillow, chainercv
Successfully installed Pillow-6.2.2 chainer-6.0.0 chainercv-0.13.1 cupy-cuda101-6.0.0 fastrlock-0.5 filelock-3.0.12 protobuf-3.7.1 typing-3.7.4.3 typing-extensions-3.7.4.3
Removing intermediate container e7b58eb2a096
 ---> ce4567ccd60c
Step 25/26 : COPY test.py /test.py
 ---> e0272c39bf11
Step 26/26 : CMD python /test.py
 ---> Running in 5777ca582f71
Removing intermediate container 5777ca582f71
 ---> 49e7255d2c0b
Successfully built 49e7255d2c0b
Successfully tagged yosuke-test-cupy-4ea471a5013a57efc4111f86a7b1beaedd3122c9:latest

@devrt
Copy link

@devrt devrt bot commented on 4ea471a Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– Simulation finished:
score: 0
time: 8.766 [sec]
screen
Click here for high quality video

Traceback (most recent call last):
  File "/test.py", line 1, in <module>
    import cupy
  File "/usr/local/lib/python2.7/dist-packages/cupy/__init__.py", line 32, in <module>
    six.reraise(ImportError, ImportError(msg), exc_info[2])
  File "/usr/local/lib/python2.7/dist-packages/cupy/__init__.py", line 11, in <module>
    from cupy import core  # NOQA
  File "/usr/local/lib/python2.7/dist-packages/cupy/core/__init__.py", line 1, in <module>
    from cupy.core import core  # NOQA
ImportError: CuPy is not correctly installed.

If you are using wheel distribution (cupy-cudaXX), make sure that the version of CuPy you installed matches with the version of CUDA on your host.
Also, confirm that only one CuPy package is installed:
  $ pip freeze

If you are building CuPy from source, please check your environment, uninstall CuPy and reinstall it with:
  $ pip install cupy --no-cache-dir -vvvv

Check the Installation Guide for details:
  https://docs-cupy.chainer.org/en/latest/install.html

original error: libcuda.so.1: cannot open shared object file: No such file or directory

Full log

Please sign in to comment.