Commit 484ec21d authored by rusty1s's avatar rusty1s
Browse files

install script

parent 76844379
...@@ -4,36 +4,29 @@ sudo: enabled ...@@ -4,36 +4,29 @@ sudo: enabled
python: python:
- 3.6 - 3.6
- 3.7
os: os:
- linux - linux
env: env:
- FORCE_CUDA=1 CUDA=9.2.148-1 CUDA_SHORT=9.2 UBUNTU_VERSION=ubuntu1604 CUBLAS=cuda-cublas-dev-9-2 TORCH=1.4.0+cu92 global:
- FORCE_CUDA=1 CUDA=10.0.130-1 CUDA_SHORT=10.0 UBUNTU_VERSION=ubuntu1804 CUBLAS=cuda-cublas-dev-10-0 TORCH=1.4.0+cu100 - TORCH_VERSION=1.4.0
- FORCE_CUDA=1 CUDA=10.1.105-1 CUDA_SHORT=10.1 UBUNTU_VERSION=ubuntu1804 CUBLAS=libcublas-dev TORCH=1.4.0 jobs:
- FORCE_CUDA=0 TORCH=1.4.0+cpu
- FORCE_CUDA=1 CUDA=9.2.148-1 CUDA_SHORT=9.2 UBUNTU_VERSION=ubuntu1604 CUBLAS=cuda-cublas-dev-9-2 TORCH=${TORCH_VERSION}+cu92
- FORCE_CUDA=1 CUDA=10.0.130-1 CUDA_SHORT=10.0 UBUNTU_VERSION=ubuntu1804 CUBLAS=cuda-cublas-dev-10-0 TORCH=${TORCH_VERSION}+cu100
- FORCE_CUDA=1 CUDA=10.1.105-1 CUDA_SHORT=10.1 UBUNTU_VERSION=ubuntu1804 CUBLAS=libcublas-dev TORCH=${TORCH_VERSION}
before_install: before_install:
- INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb - bash install.sh
- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
- sudo dpkg -i ${INSTALLER}
- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
- sudo apt-key add 7fa2af80.pub
- sudo apt update -qq
- sudo apt install -y cuda-core-${CUDA_SHORT/./-} cuda-cudart-dev-${CUDA_SHORT/./-} ${CUBLAS} cuda-cusparse-dev-${CUDA_SHORT/./-}
- sudo apt clean
- CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
- LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
- PATH=${CUDA_HOME}/bin:${PATH}
install: install:
- pip install numpy - pip install numpy
- pip install torch==${TORCH} -f https://download.pytorch.org/whl/torch_stable.html - pip install torch==${TORCH} -f https://download.pytorch.org/whl/torch_stable.html
- python -c "import torch; print(torch.__version__)"
- pip install flake8 - pip install flake8
script: script:
- python -c "import torch; print(torch.__version__)"
- flake8 . - flake8 .
- python setup.py install - python setup.py install
- python setup.py test - python setup.py test
......
#!/bin/bash
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
wget "http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}"
sudo dpkg -i "${INSTALLER}"
wget "https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub"
sudo apt-key add 7fa2af80.pub
sudo apt update -qq
sudo apt install -y "cuda-core-${CUDA_SHORT/./-} cuda-cudart-dev-${CUDA_SHORT/./-} ${CUBLAS} cuda-cusparse-dev-${CUDA_SHORT/./-}"
sudo apt clean
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
export PATH=${CUDA_HOME}/bin:${PATH}
nvcc --version
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment