Update conda packages build. (#1422)
Summary: This PR paves the way for nightly builds. + Get rid of cmake 3.17 manual install as cmake 3.18 is now available in conda. + Update docker files for conda packages. + Specify CUDA architectures via CMake's `CMAKE_CUDA_ARCHITECTURES`. Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1422 Reviewed By: mdouze Differential Revision: D23870447 Pulled By: beauby fbshipit-source-id: 40ae7517e83356443a007a43261713e7e3a140d4pull/1431/head
parent
d8af5138cd
commit
3ac3ca0fab
|
@ -1,33 +0,0 @@
|
|||
FROM soumith/conda-cuda:latest
|
||||
|
||||
COPY ./ faiss
|
||||
WORKDIR /faiss/conda
|
||||
|
||||
ENV FAISS_BUILD_VERSION 1.5.3
|
||||
ENV FAISS_BUILD_NUMBER 0
|
||||
RUN conda build faiss --no-anaconda-upload -c pytorch
|
||||
RUN CUDA_ROOT=/usr/local/cuda-8.0 \
|
||||
CUDA_ARCH="-gencode=arch=compute_35,code=compute_35 \
|
||||
-gencode=arch=compute_52,code=compute_52 \
|
||||
-gencode=arch=compute_60,code=compute_60 \
|
||||
-gencode=arch=compute_61,code=compute_61" \
|
||||
conda build faiss-gpu --variants '{ "cudatoolkit": "8.0" }' \
|
||||
--no-anaconda-upload -c pytorch --no-test
|
||||
RUN CUDA_ROOT=/usr/local/cuda-9.0 \
|
||||
CUDA_ARCH="-gencode=arch=compute_35,code=compute_35 \
|
||||
-gencode=arch=compute_52,code=compute_52 \
|
||||
-gencode=arch=compute_60,code=compute_60 \
|
||||
-gencode=arch=compute_61,code=compute_61 \
|
||||
-gencode=arch=compute_70,code=compute_70" \
|
||||
conda build faiss-gpu --variants '{ "cudatoolkit": "9.0" }' \
|
||||
--no-anaconda-upload -c pytorch --no-test
|
||||
RUN CUDA_ROOT=/usr/local/cuda-10.0 \
|
||||
CUDA_ARCH="-gencode=arch=compute_35,code=compute_35 \
|
||||
-gencode=arch=compute_52,code=compute_52 \
|
||||
-gencode=arch=compute_60,code=compute_60 \
|
||||
-gencode=arch=compute_61,code=compute_61 \
|
||||
-gencode=arch=compute_70,code=compute_70 \
|
||||
-gencode=arch=compute_72,code=compute_72 \
|
||||
-gencode=arch=compute_75,code=compute_75" \
|
||||
conda build faiss-gpu --variants '{ "cudatoolkit": "10.0" }' \
|
||||
--no-anaconda-upload -c pytorch --no-test
|
|
@ -0,0 +1,14 @@
|
|||
FROM nvidia/cuda:10.2-devel-ubuntu18.04
|
||||
|
||||
RUN apt-get update && apt-get install -y wget git
|
||||
|
||||
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
||||
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
|
||||
ENV PATH="/root/miniconda3/condabin:${PATH}"
|
||||
|
||||
RUN conda install conda-build
|
||||
|
||||
COPY ./ faiss
|
||||
WORKDIR /faiss/conda
|
||||
|
||||
RUN conda build faiss --no-anaconda-upload -c pytorch
|
|
@ -0,0 +1,16 @@
|
|||
FROM nvidia/cuda:10.2-devel-ubuntu18.04
|
||||
|
||||
RUN apt-get update && apt-get install -y wget git libcublas-dev
|
||||
|
||||
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
||||
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
|
||||
ENV PATH="/root/miniconda3/condabin:${PATH}"
|
||||
|
||||
RUN conda install conda-build
|
||||
|
||||
COPY ./ faiss
|
||||
WORKDIR /faiss/conda
|
||||
|
||||
RUN CUDA_ARCHS="35;52;60;61;70;72;75" \
|
||||
conda build faiss-gpu --variants '{ "cudatoolkit": "10.2" }' \
|
||||
--no-anaconda-upload -c pytorch --no-test
|
|
@ -1,7 +1,6 @@
|
|||
CONDA_BUILD_SYSROOT:
|
||||
- /opt/MacOSX10.9.sdk # [osx]
|
||||
python:
|
||||
- 2.7 # [not win]
|
||||
- 3.6
|
||||
- 3.7
|
||||
- 3.8
|
||||
|
|
|
@ -13,6 +13,7 @@ cmake -B _build_avx2 \
|
|||
-DBUILD_TESTING=OFF \
|
||||
-DFAISS_OPT_LEVEL=avx2 \
|
||||
-DFAISS_ENABLE_GPU=ON \
|
||||
-DCMAKE_CUDA_ARCHITECTURES="${CUDA_ARCHS}" \
|
||||
-DFAISS_ENABLE_PYTHON=OFF \
|
||||
-DBLA_VENDOR=Intel10_64lp \
|
||||
-DCMAKE_BUILD_TYPE=Release .
|
||||
|
@ -28,6 +29,7 @@ cmake -B _build_generic \
|
|||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DFAISS_ENABLE_GPU=ON \
|
||||
-DCMAKE_CUDA_ARCHITECTURES="${CUDA_ARCHS}" \
|
||||
-DFAISS_ENABLE_PYTHON=OFF \
|
||||
-DBLA_VENDOR=Intel10_64lp \
|
||||
-DCMAKE_BUILD_TYPE=Release .
|
||||
|
|
|
@ -30,11 +30,13 @@ outputs:
|
|||
string: "h{{ PKG_HASH }}_{{ number }}_cuda{{ cudatoolkit }}"
|
||||
run_exports:
|
||||
- {{ pin_compatible('libfaiss', exact=True) }}
|
||||
script_env:
|
||||
- CUDA_ARCHS
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
- llvm-openmp # [osx]
|
||||
- cmake-local
|
||||
- cmake >=3.18
|
||||
host:
|
||||
- mkl >=2018
|
||||
- blas =*=mkl
|
||||
|
@ -42,7 +44,7 @@ outputs:
|
|||
run:
|
||||
- mkl >=2018
|
||||
- blas =*=mkl
|
||||
- {{ pin_compatible('cudatoolkit') }}
|
||||
- {{ pin_compatible('cudatoolkit', max_pin='x') }}
|
||||
test:
|
||||
commands:
|
||||
- test -f $PREFIX/lib/libfaiss.so # [linux]
|
||||
|
@ -58,7 +60,7 @@ outputs:
|
|||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
- swig
|
||||
- cmake-local
|
||||
- cmake >=3.17
|
||||
host:
|
||||
- python {{ python }}
|
||||
- numpy 1.11.*
|
||||
|
@ -76,10 +78,3 @@ outputs:
|
|||
- python -m unittest discover faiss/gpu/test/
|
||||
source_files:
|
||||
- tests/
|
||||
|
||||
- name: cmake-local
|
||||
version: 3.17
|
||||
script: install-cmake.sh
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
|
|
|
@ -35,8 +35,7 @@ outputs:
|
|||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
- llvm-openmp # [osx]
|
||||
- cmake >=3.17 # [win]
|
||||
- cmake-local # [not win]
|
||||
- cmake >=3.17
|
||||
host:
|
||||
- mkl-devel >=2018
|
||||
- blas =*=mkl
|
||||
|
@ -59,8 +58,7 @@ outputs:
|
|||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
- swig
|
||||
- cmake >=3.17 # [win]
|
||||
- cmake-local # [not win]
|
||||
- cmake >=3.17
|
||||
host:
|
||||
- python {{ python }}
|
||||
- numpy 1.11.*
|
||||
|
@ -77,12 +75,3 @@ outputs:
|
|||
- python -m unittest discover tests/
|
||||
source_files:
|
||||
- tests/
|
||||
|
||||
- name: cmake-local
|
||||
version: 3.17
|
||||
script: install-cmake.sh
|
||||
build:
|
||||
skip: True # [win]
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
|
|
Loading…
Reference in New Issue