diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..1a9662e73 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +dist: bionic +language: python +cache: pip +python: + - "2.7" + - "3.7" +env: + - CUDA=10.1.105-1 CUDA_APT=10-1 CUDA_SHORT=10.1 UBUNTU_VERSION=ubuntu1804 NCCL=1.0.0-1 +before_install: + - CUDA_REPO=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb + - NCCL_REPO=nvidia-machine-learning-repo-${UBUNTU_VERSION}_${NCCL}_amd64.deb + - wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${CUDA_REPO} + - sudo dpkg -i ${CUDA_REPO} + - sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub + - wget http://developer.download.nvidia.com/compute/machine-learning/repos/${UBUNTU_VERSION}/x86_64/${NCCL_REPO} + - sudo dpkg -i ${NCCL_REPO} +install: + - sudo apt update -qq + - sudo apt install -y cuda libnccl2 libnccl-dev libnuma-dev + - sudo apt clean + - CUDA_HOME=/usr/local/cuda-${CUDA_SHORT} + - LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} + - PATH=${CUDA_HOME}/bin:${PATH} + - pip install mxnet-cu101 tensorflow-gpu torch torchvision +script: + - BYTEPS_CUDA_HOME=${CUDA_HOME} + - python setup.py install diff --git a/README.md b/README.md index ffee3b22d..897bcd6dd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # BytePS +[![Build Status](https://travis-ci.org/bytedance/byteps.svg?branch=master)](https://travis-ci.org/bytedance/byteps) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) BytePS is a high performance and general distributed training framework. It supports TensorFlow, Keras, PyTorch, and MXNet, and can run on either TCP or RDMA network. diff --git a/setup.py b/setup.py index 4889fa3f7..9df9176da 100644 --- a/setup.py +++ b/setup.py @@ -755,10 +755,13 @@ class custom_build_ext(build_ext): def build_extensions(self): if not os.path.exists("3rdparty/ps-lite/build/libps.a") or \ not os.path.exists("3rdparty/ps-lite/deps/lib"): - str_rdma_option = "" + make_option = "" + if os.environ.get('CI', 'false') == 'false': + make_option += "-j " if int(os.environ.get('BYTEPS_USE_RDMA', 0)): - str_rdma_option += "USE_RDMA=1" - make_process = subprocess.Popen('make -j ' + str_rdma_option, + make_option += "USE_RDMA=1 " + + make_process = subprocess.Popen('make ' + make_option, cwd='3rdparty/ps-lite', stdout=sys.stdout, stderr=sys.stderr,