Skip to content

Commit

Permalink
test nvidia-smi
Browse files Browse the repository at this point in the history
  • Loading branch information
yosuke committed Dec 16, 2020
1 parent 4ea471a commit 680f73e
Showing 1 changed file with 2 additions and 64 deletions.
66 changes: 2 additions & 64 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,65 +1,3 @@
FROM ros:melodic
FROM nvidia/cuda:10.0-base

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
CMD nvidia-smi

4 comments on commit 680f73e

@devrt
Copy link

@devrt devrt bot commented on 680f73e 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 680f73e 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
β”œβ”€β”€ [  42]  Dockerfile
└── [  36]  test.py

0 directories, 3 files

@devrt
Copy link

@devrt devrt bot commented on 680f73e 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:

Sending build context to Docker daemon  63.49kB

Step 1/2 : FROM nvidia/cuda:10.0-base
 ---> 841d44dd4b3c
Step 2/2 : CMD nvidia-smi
 ---> Running in f267d093b4d7
Removing intermediate container f267d093b4d7
 ---> 6634167eabad
Successfully built 6634167eabad
Successfully tagged yosuke-test-cupy-680f73ec290a43b877ece3ac95d096ec89be79e4:latest

@devrt
Copy link

@devrt devrt bot commented on 680f73e 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: 0 [sec]
screen
Click here for high quality video

Wed Dec 16 11:38:10 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66       Driver Version: 450.66       CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 107...  Off  | 00000000:07:00.0 Off |                  N/A |
|  0%   32C    P8     5W / 180W |     20MiB /  8117MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Full log

Please sign in to comment.