mirror of https://github.com/milvus-io/milvus.git
50 lines
2.6 KiB
Docker
50 lines
2.6 KiB
Docker
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
|
|
FROM nvidia/cuda:10.1-devel-ubuntu18.04
|
|
|
|
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends wget && \
|
|
wget -qO- "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
|
|
wget -P /tmp https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
|
|
apt-key add /tmp/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
|
|
sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' && \
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
git flex bison gfortran lsb-core \
|
|
curl libtool automake libboost-all-dev libssl-dev pkg-config libcurl4-openssl-dev python3-pip \
|
|
clang-format-7 clang-tidy-7 \
|
|
lcov mysql-client libmysqlclient-dev intel-mkl-gnu-2019.5-281 intel-mkl-core-2019.5-281 && \
|
|
apt-get remove --purge -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
|
|
|
|
RUN sh -c 'echo export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64:\$LD_LIBRARY_PATH > /etc/profile.d/mkl.sh'
|
|
|
|
RUN wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
|
|
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \
|
|
make TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="-O3 -g -fPIC" FCOMMON_OPT="-O3 -g -fPIC -frecursive" NMAX="NUM_THREADS=128" LIBPREFIX="libopenblas" LAPACKE="NO_LAPACKE=1" INTERFACE64=0 NO_STATIC=1 && \
|
|
make PREFIX=/usr install && \
|
|
cd .. && rm -rf OpenBLAS-0.3.9 && rm v0.3.9.tar.gz
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ccache && \
|
|
apt-get remove --purge -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# use login shell to activate environment un the RUN commands
|
|
SHELL [ "/bin/bash", "-c", "-l" ]
|
|
|
|
# use login shell when running the container
|
|
ENTRYPOINT [ "/bin/bash", "-c", "-l" ]
|