mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-24 19:43:35 +00:00
64 lines
No EOL
1.8 KiB
Docker
64 lines
No EOL
1.8 KiB
Docker
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
# Tag: cuda:10.1-cudnn7-devel-ubuntu16.04
|
|
# Env: CUDA_VERSION=10.1.243
|
|
# Env: NCCL_VERSION=2.4.8
|
|
# Env: CUDNN_VERSION=7.6.3.30
|
|
# Ubuntu 16.04
|
|
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04
|
|
|
|
USER root:root
|
|
|
|
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
ENV LD_LIBRARY_PATH "/usr/local/cuda/extras/CUPTI/lib64:${LD_LIBRARY_PATH}"
|
|
ENV NCCL_DEBUG=INFO
|
|
ENV HOROVOD_GPU_ALLREDUCE=NCCL
|
|
|
|
# Install Common Dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
# SSH and RDMA
|
|
libmlx4-1 \
|
|
libmlx5-1 \
|
|
librdmacm1 \
|
|
libibverbs1 \
|
|
libmthca1 \
|
|
libdapl2 \
|
|
dapl2-utils \
|
|
openssh-client \
|
|
openssh-server \
|
|
iproute2 && \
|
|
# Others
|
|
apt-get install -y \
|
|
build-essential \
|
|
bzip2 \
|
|
git=1:2.7.4-0ubuntu1.7 \
|
|
wget \
|
|
cpio && \
|
|
apt-get clean -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Conda Environment
|
|
ENV MINICONDA_VERSION 4.5.11
|
|
ENV PATH /opt/miniconda/bin:$PATH
|
|
RUN wget -qO /tmp/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh && \
|
|
bash /tmp/miniconda.sh -bf -p /opt/miniconda && \
|
|
conda clean -ay && \
|
|
rm -rf /opt/miniconda/pkgs && \
|
|
rm /tmp/miniconda.sh && \
|
|
find / -type d -name __pycache__ | xargs rm -rf
|
|
|
|
# Open-MPI installation
|
|
ENV OPENMPI_VERSION 4.0.0
|
|
RUN mkdir /tmp/openmpi && \
|
|
cd /tmp/openmpi && \
|
|
wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-${OPENMPI_VERSION}.tar.gz && \
|
|
tar zxf openmpi-${OPENMPI_VERSION}.tar.gz && \
|
|
cd openmpi-${OPENMPI_VERSION} && \
|
|
./configure --enable-orterun-prefix-by-default && \
|
|
make -j $(nproc) all && \
|
|
make install && \
|
|
ldconfig && \
|
|
rm -rf /tmp/openmpi |