Add nightly packages for GPU. (#1485)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1485 Test Plan: Imported from OSS Reviewed By: wickedfoo Differential Revision: D24492171 Pulled By: beauby fbshipit-source-id: 20fbcbdd50ab30e110e41b34e0c07d88432b1422pull/1486/head
parent
0b365fa6d8
commit
7891094da6
|
@ -114,9 +114,9 @@ jobs:
|
||||||
|
|
||||||
deploy_linux:
|
deploy_linux:
|
||||||
parameters:
|
parameters:
|
||||||
nightly:
|
label:
|
||||||
type: boolean
|
type: string
|
||||||
default: false
|
default: main
|
||||||
docker:
|
docker:
|
||||||
- image: continuumio/miniconda3
|
- image: continuumio/miniconda3
|
||||||
steps:
|
steps:
|
||||||
|
@ -126,19 +126,40 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
conda install -y -q conda-build anaconda-client
|
conda install -y -q conda-build anaconda-client
|
||||||
conda config --set anaconda_upload yes
|
conda config --set anaconda_upload yes
|
||||||
- run: |
|
- run:
|
||||||
|
name: Build packages
|
||||||
|
command: |
|
||||||
cd conda
|
cd conda
|
||||||
if [ "<<parameters.nightly>>" = "true" ]; then
|
conda build faiss --user pytorch --label <<parameters.label>>
|
||||||
FAISS_VERSION="1.0.0_nightly_$(date '+%Y%m%d')" conda build faiss --user pytorch --label nightly
|
|
||||||
else
|
deploy_linux_gpu:
|
||||||
conda build faiss --user pytorch
|
parameters:
|
||||||
fi
|
label:
|
||||||
|
type: string
|
||||||
|
default: main
|
||||||
|
cuda:
|
||||||
|
type: string
|
||||||
|
machine:
|
||||||
|
resource_class: gpu.nvidia.small
|
||||||
|
image: ubuntu-1604-cuda-10.1:201909-23
|
||||||
|
docker_layer_caching: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Build packages
|
||||||
|
command: |
|
||||||
|
docker build -t faiss -f conda/Dockerfile.cuda<<parameters.cuda>>
|
||||||
|
docker run --gpus all \
|
||||||
|
-e CUDA_ARCHS="35;52;60;61;70;72;75" \
|
||||||
|
-e ANACONDA_API_TOKEN=$ANACONDA_API_TOKEN \
|
||||||
|
conda build faiss-gpu --variants '{ "cudatoolkit": "<<parameters.cuda>>" }' \
|
||||||
|
--user pytorch --label <<parameters.label>>
|
||||||
|
|
||||||
deploy_osx:
|
deploy_osx:
|
||||||
parameters:
|
parameters:
|
||||||
nightly:
|
label:
|
||||||
type: boolean
|
type: string
|
||||||
default: false
|
default: main
|
||||||
macos:
|
macos:
|
||||||
xcode: 11.6.0
|
xcode: 11.6.0
|
||||||
steps:
|
steps:
|
||||||
|
@ -154,20 +175,18 @@ jobs:
|
||||||
name: Install MacOSX10.9 SDK
|
name: Install MacOSX10.9 SDK
|
||||||
command: |
|
command: |
|
||||||
curl -L -o - https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz | sudo tar xJf - -C /opt
|
curl -L -o - https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz | sudo tar xJf - -C /opt
|
||||||
- run: |
|
- run:
|
||||||
export PATH=~/miniconda/bin:$PATH
|
name: Build packages
|
||||||
cd conda
|
command: |
|
||||||
if [ "<<parameters.nightly>>" = "true" ]; then
|
export PATH=~/miniconda/bin:$PATH
|
||||||
FAISS_VERSION="1.0.0_nightly_$(date '+%Y%m%d')" conda build faiss --user pytorch --label nightly
|
cd conda
|
||||||
else
|
conda build faiss --user pytorch --label <<parameters.label>>
|
||||||
conda build faiss --user pytorch
|
|
||||||
fi
|
|
||||||
|
|
||||||
deploy_windows:
|
deploy_windows:
|
||||||
parameters:
|
parameters:
|
||||||
nightly:
|
label:
|
||||||
type: boolean
|
type: string
|
||||||
default: false
|
default: main
|
||||||
executor:
|
executor:
|
||||||
name: win/default
|
name: win/default
|
||||||
shell: bash.exe
|
shell: bash.exe
|
||||||
|
@ -178,37 +197,58 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
conda install -y -q conda-build anaconda-client
|
conda install -y -q conda-build anaconda-client
|
||||||
conda config --set anaconda_upload yes
|
conda config --set anaconda_upload yes
|
||||||
- run: |
|
- run:
|
||||||
|
name: Build packages
|
||||||
|
command: |
|
||||||
cd conda
|
cd conda
|
||||||
if [ "<<parameters.nightly>>" = "true" ]; then
|
conda build faiss --user pytorch --label <<parameters.label>>
|
||||||
FAISS_VERSION="1.0.0_nightly_$(date '+%Y%m%d')" conda build faiss --user pytorch --label nightly
|
|
||||||
else
|
|
||||||
conda build faiss --user pytorch
|
|
||||||
fi
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
build:
|
build:
|
||||||
jobs:
|
jobs:
|
||||||
- build_linux
|
- build_linux:
|
||||||
|
name: Linux
|
||||||
- build_linux_gpu:
|
- build_linux_gpu:
|
||||||
|
name: Linux GPU
|
||||||
requires:
|
requires:
|
||||||
- build_linux
|
- Linux
|
||||||
- build_osx
|
- build_osx:
|
||||||
- build_windows
|
name: OSX
|
||||||
|
- build_windows:
|
||||||
|
name: Windows
|
||||||
- deploy_linux:
|
- deploy_linux:
|
||||||
|
name: Linux packages
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /^v.*/
|
||||||
|
branches:
|
||||||
|
ignore: /.*/
|
||||||
|
- deploy_linux_gpu:
|
||||||
|
name: Linux GPU packages (CUDA 10.1)
|
||||||
|
cuda: "10.1"
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /^v.*/
|
||||||
|
branches:
|
||||||
|
ignore: /.*/
|
||||||
|
- deploy_linux_gpu:
|
||||||
|
name: Linux GPU packages (CUDA 10.2)
|
||||||
|
cuda: "10.2"
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /^v.*/
|
only: /^v.*/
|
||||||
branches:
|
branches:
|
||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
- deploy_windows:
|
- deploy_windows:
|
||||||
|
name: Windows packages
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /^v.*/
|
only: /^v.*/
|
||||||
branches:
|
branches:
|
||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
- deploy_osx:
|
- deploy_osx:
|
||||||
|
name: OSX packages
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /^v.*/
|
only: /^v.*/
|
||||||
|
@ -225,8 +265,19 @@ workflows:
|
||||||
- master
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
- deploy_linux:
|
- deploy_linux:
|
||||||
nightly: true
|
name: Linux nightlies
|
||||||
|
label: nightly
|
||||||
|
- deploy_linux_gpu:
|
||||||
|
name: Linux GPU nightlies (CUDA 10.1)
|
||||||
|
cuda: "10.1"
|
||||||
|
label: nightly
|
||||||
|
- deploy_linux_gpu:
|
||||||
|
name: Linux GPU nightlies (CUDA 10.2)
|
||||||
|
cuda: "10.2"
|
||||||
|
label: nightly
|
||||||
- deploy_windows:
|
- deploy_windows:
|
||||||
nightly: true
|
name: Windows nightlies
|
||||||
|
label: nightly
|
||||||
- deploy_osx:
|
- deploy_osx:
|
||||||
nightly: true
|
name: OSX nightlies
|
||||||
|
label: nightly
|
||||||
|
|
|
@ -6,13 +6,9 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh &
|
||||||
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
|
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
|
||||||
ENV PATH="/root/miniconda3/condabin:${PATH}"
|
ENV PATH="/root/miniconda3/condabin:${PATH}"
|
||||||
|
|
||||||
RUN conda install conda-build
|
RUN conda install -y -q conda-build anaconda-client
|
||||||
|
RUN conda config --set anaconda_upload yes
|
||||||
|
|
||||||
RUN sh -c 'cp /usr/include/cublas*.h /usr/local/cuda/include/'
|
RUN sh -c 'cp /usr/include/cublas*.h /usr/local/cuda/include/'
|
||||||
COPY ./ faiss
|
COPY ./ faiss
|
||||||
WORKDIR /faiss/conda
|
WORKDIR /faiss/conda
|
||||||
|
|
||||||
|
|
||||||
RUN CUDA_ARCHS="35;52;60;61;70;72;75" \
|
|
||||||
conda build faiss-gpu --variants '{ "cudatoolkit": "10.1" }' \
|
|
||||||
--no-anaconda-upload -c pytorch --no-test
|
|
||||||
|
|
|
@ -11,11 +11,8 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh &
|
||||||
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
|
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
|
||||||
ENV PATH="/root/miniconda3/condabin:${PATH}"
|
ENV PATH="/root/miniconda3/condabin:${PATH}"
|
||||||
|
|
||||||
RUN conda install conda-build
|
RUN conda install -y -q conda-build anaconda-client
|
||||||
|
RUN conda config --set anaconda_upload yes
|
||||||
|
|
||||||
COPY ./ faiss
|
COPY ./ faiss
|
||||||
WORKDIR /faiss/conda
|
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
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
# This source code is licensed under the MIT license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
{% set version = environ.get('FAISS_VERSION', GIT_DESCRIBE_TAG) %}
|
{% set version = GIT_DESCRIBE_TAG %}
|
||||||
{% set number = '0' if environ.get('FAISS_VERSION') else GIT_DESCRIBE_NUMBER %}
|
{% set number = GIT_DESCRIBE_NUMBER %}
|
||||||
|
|
||||||
package:
|
package:
|
||||||
name: faiss-pkg
|
name: faiss-pkg
|
||||||
|
@ -75,6 +75,7 @@ outputs:
|
||||||
requires:
|
requires:
|
||||||
- numpy
|
- numpy
|
||||||
- scipy
|
- scipy
|
||||||
|
- pytorch
|
||||||
commands:
|
commands:
|
||||||
- python -m unittest discover tests/
|
- python -m unittest discover tests/
|
||||||
- python -m unittest discover faiss/gpu/test/
|
- python -m unittest discover faiss/gpu/test/
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
# This source code is licensed under the MIT license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
{% set version = environ.get('FAISS_VERSION', GIT_DESCRIBE_TAG) %}
|
{% set version = GIT_DESCRIBE_TAG %}
|
||||||
{% set number = '0' if environ.get('FAISS_VERSION') else GIT_DESCRIBE_NUMBER %}
|
{% set number = GIT_DESCRIBE_NUMBER %}
|
||||||
|
|
||||||
package:
|
package:
|
||||||
name: faiss-pkg
|
name: faiss-pkg
|
||||||
|
|
Loading…
Reference in New Issue