テスト中

dockerにてNVIDIA Container Toolkitの入ったdockerエンジンを作成

っでJupyterNotebookのようにdocker-composeとDockerfileを作ってみる

Dockerfile

FROM nvidia/cuda:11.2.1-devel-centos7
RUN yum update -y && yum groupinstall -y "Development Tools" && \
    yum install -y cmake openmpi-devel fltk-fluid fftw-devel \
                libtiff-devel libX11-devel texlive-latex-bin \
                texlive-cm texlive-dvips ghostscript evince git
 
ENV PATH=/usr/lib64/openmpi/bin:/usr/local/cuda-11.2/bin:$PATH
ENV LIBRARY_PATH=/usr/lib64/openmpi/lib:/usr/local/cuda-11.0/lib64:$LIBRARY_PATH
 
RUN mkdir -p /apps/src && cd /apps/src && \
          git clone https://github.com/3dem/relion.git
RUN cd /apps/src/relion && \
          git checkout  -b 3.1.1 refs/tags/3.1.1 && mkdir b
RUN cd /apps/src/relion/b && cmake -DCUDA=ON -DCMAKE_INSTALL_PREFIX=/usr/local \
          -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda .. && \
          make  &&  make install
WORKDIR /work

docker-compose.yml

version: '3.5'
 
services:
    chaperone_relion:
        build:
            context: .
            dockerfile: Dockerfile
        environment:
            - NVIDIA_VISIBLE_DEVICES=all
            - NVIDIA_DRIVER_CAPABILITIES=all
        volumes:
            - /home/illya/work:/work
        restart: always

docker run -it --rm --gpus all --net host -e DISPLAY=${DISPLAY} -v $HOME/.Xauthority:/root/.Xauthority relion_chaperone_relion bash


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2021-03-05 (金) 00:20:55 (43d)