mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-02 03:55:34 +00:00
63 lines
No EOL
2.1 KiB
Docker
63 lines
No EOL
2.1 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}"
|
|
|
|
# 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
|
|
|
|
# Intel MPI installation
|
|
ENV INTEL_MPI_VERSION 2018.3.222
|
|
ENV PATH $PATH:/opt/intel/compilers_and_libraries/linux/mpi/bin64
|
|
RUN cd /tmp && \
|
|
wget -q "http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13063/l_mpi_${INTEL_MPI_VERSION}.tgz" && \
|
|
tar zxvf l_mpi_${INTEL_MPI_VERSION}.tgz && \
|
|
sed -i -e 's/^ACCEPT_EULA=decline/ACCEPT_EULA=accept/g' /tmp/l_mpi_${INTEL_MPI_VERSION}/silent.cfg && \
|
|
cd /tmp/l_mpi_${INTEL_MPI_VERSION} && \
|
|
./install.sh -s silent.cfg --arch=intel64 && \
|
|
cd / && \
|
|
rm -rf /tmp/l_mpi_${INTEL_MPI_VERSION}* && \
|
|
rm -rf /opt/intel/compilers_and_libraries_${INTEL_MPI_VERSION}/linux/mpi/intel64/lib/debug* && \
|
|
echo "source /opt/intel/compilers_and_libraries_${INTEL_MPI_VERSION}/linux/mpi/intel64/bin/mpivars.sh" >> ~/.bashrc |