forked from zilliztech/knowhere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile for ubuntu22.04 (zilliztech#557)
Signed-off-by: Cai Yudong <[email protected]>
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV CMAKE_VERSION="v3.28" | ||
ENV CMAKE_TAR="cmake-3.28.4-linux-x86_64.tar.gz" | ||
ENV CCACHE_VERSION="v4.9.1" | ||
ENV CCACHE_TAR="ccache-4.9.1-linux-x86_64.tar.xz" | ||
|
||
RUN apt update \ | ||
&& apt install -y ca-certificates apt-transport-https software-properties-common lsb-release \ | ||
&& gpg --list-keys \ | ||
&& gpg --no-default-keyring --keyring /usr/share/keyrings/deadsnakes.gpg \ | ||
--keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 \ | ||
&& echo "deb [signed-by=/usr/share/keyrings/deadsnakes.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu \ | ||
$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/python.list \ | ||
&& apt install -y --no-install-recommends wget curl git g++ gcc make gfortran swig \ | ||
&& apt install -y python3.11 python3.11-dev python3.11-distutils \ | ||
&& apt install -y python3-setuptools \ | ||
&& cd /usr/bin \ | ||
&& unlink python3 && ln -s python3.11 python3 \ | ||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \ | ||
&& pip3 install wheel \ | ||
&& apt remove --purge -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# install cmake and ccache | ||
RUN cd /tmp \ | ||
&& wget --tries=3 --retry-connrefused "https://cmake.org/files/${CMAKE_VERSION}/${CMAKE_TAR}" \ | ||
&& tar --strip-components=1 -xz -C /usr/local -f ${CMAKE_TAR} \ | ||
&& rm -f ${CMAKE_TAR} \ | ||
&& wget --tries=3 --retry-connrefused "https://github.com/ccache/ccache/releases/download/${CCACHE_VERSION}/${CCACHE_TAR}" \ | ||
&& tar -xf ${CCACHE_TAR} \ | ||
&& cp ccache-4.9.1-linux-x86_64/ccache /usr/local/bin \ | ||
&& rm -f ${CCACHE_TAR} | ||
|
||
# install knowhere dependancies | ||
RUN apt update \ | ||
&& apt install -y libopenblas-dev libcurl4-openssl-dev libaio-dev libevent-dev lcov \ | ||
&& pip3 install conan==1.61.0 \ | ||
&& conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local \ | ||
&& export PATH=$PATH:$HOME/.local/bin | ||
|
||
# clone knowhere repo and build to update .conan | ||
RUN git clone https://github.com/zilliztech/knowhere.git \ | ||
&& cd knowhere \ | ||
&& mkdir build && cd build \ | ||
&& conan install .. --build=missing -o with_ut=True -o with_diskann=True -s compiler.libcxx=libstdc++11 -s build_type=Release \ | ||
&& conan build .. \ | ||
&& cd ../.. \ | ||
&& rm -rf knowhere |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV CMAKE_VERSION="v3.28" | ||
ENV CMAKE_TAR="cmake-3.28.4-linux-x86_64.tar.gz" | ||
ENV CCACHE_VERSION="v4.9.1" | ||
ENV CCACHE_TAR="ccache-4.9.1-linux-x86_64.tar.xz" | ||
|
||
RUN apt update \ | ||
&& apt install -y ca-certificates apt-transport-https software-properties-common lsb-release \ | ||
&& gpg --list-keys \ | ||
&& gpg --no-default-keyring --keyring /usr/share/keyrings/deadsnakes.gpg \ | ||
--keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 \ | ||
&& echo "deb [signed-by=/usr/share/keyrings/deadsnakes.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu \ | ||
$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/python.list \ | ||
&& apt install -y --no-install-recommends wget curl git g++ gcc make gfortran swig \ | ||
&& apt install -y python3.11 python3.11-dev python3.11-distutils \ | ||
&& apt install -y python3-setuptools \ | ||
&& cd /usr/bin \ | ||
&& unlink python3 && ln -s python3.11 python3 \ | ||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \ | ||
&& pip3 install wheel \ | ||
&& apt remove --purge -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# install cmake and ccache | ||
RUN cd /tmp \ | ||
&& wget --tries=3 --retry-connrefused "https://cmake.org/files/${CMAKE_VERSION}/${CMAKE_TAR}" \ | ||
&& tar --strip-components=1 -xz -C /usr/local -f ${CMAKE_TAR} \ | ||
&& rm -f ${CMAKE_TAR} \ | ||
&& wget --tries=3 --retry-connrefused "https://github.com/ccache/ccache/releases/download/${CCACHE_VERSION}/${CCACHE_TAR}" \ | ||
&& tar -xf ${CCACHE_TAR} \ | ||
&& cp ccache-4.9.1-linux-x86_64/ccache /usr/local/bin \ | ||
&& rm -f ${CCACHE_TAR} | ||
|
||
# install knowhere dependancies | ||
RUN apt update \ | ||
&& apt install -y libopenblas-dev libcurl4-openssl-dev libaio-dev libevent-dev lcov \ | ||
&& pip3 install conan==1.61.0 \ | ||
&& conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local \ | ||
&& export PATH=$PATH:$HOME/.local/bin | ||
|
||
# clone knowhere repo and build to update .conan | ||
RUN git clone https://github.com/zilliztech/knowhere.git \ | ||
&& cd knowhere \ | ||
&& mkdir build && cd build \ | ||
&& conan install .. --build=missing -o with_ut=True -o with_diskann=True -o with_raft=True -s compiler.libcxx=libstdc++11 -s build_type=Release \ | ||
&& conan build .. \ | ||
&& cd ../.. \ | ||
&& rm -rf knowhere |