Skip to content
Snippets Groups Projects
Commit 66af0637 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Try to install CUDA version corresponding to CUDA_VERSION

parent c4cf223a
Branches
No related merge requests found
...@@ -13,35 +13,35 @@ matrix: ...@@ -13,35 +13,35 @@ matrix:
- os: windows - os: windows
include: include:
- python: 3.5 - python: 3.5
env: CUDA_VERSION=9.2 env: CUDA_VERSION=9-2
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename
- python: 3.6 - python: 3.6
env: CUDA_VERSION=9.2 env: CUDA_VERSION=9-2
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename
- python: 3.7 - python: 3.7
env: CUDA_VERSION=9.2 env: CUDA_VERSION=9-2
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename
- python: 3.8 - python: 3.8
env: CUDA_VERSION=9.2 env: CUDA_VERSION=9-2
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit rename
- python: 3.5 - python: 3.5
env: CUDA_VERSION=10.1 env: CUDA_VERSION=10-1
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential rename - sudo apt-get install -y ninja-build build-essential rename
- python: 3.6 - python: 3.6
env: CUDA_VERSION=10.1 env: CUDA_VERSION=10-1
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential rename - sudo apt-get install -y ninja-build build-essential rename
- python: 3.7 - python: 3.7
env: CUDA_VERSION=10.1 env: CUDA_VERSION=10-1
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential rename - sudo apt-get install -y ninja-build build-essential rename
- python: 3.8 - python: 3.8
env: CUDA_VERSION=10.1 env: CUDA_VERSION=10-1
before_install: before_install:
- sudo apt-get install -y ninja-build build-essential rename - sudo apt-get install -y ninja-build build-essential rename
- name: Python 3.7.2 on macOS - name: Python 3.7.2 on macOS
......
...@@ -42,13 +42,13 @@ if [[ "$DISTRIB" == "conda" ]]; then ...@@ -42,13 +42,13 @@ if [[ "$DISTRIB" == "conda" ]]; then
shopt -s expand_aliases shopt -s expand_aliases
fi fi
if [[ "$CUDA_VERSION" == "10.1" ]]; then if [[ "$CUDA_VERSION" != "9-2" ]]; then
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update sudo apt-get update
sudo apt-get -y install cuda sudo apt-get -y install cuda-$CUDA_VERSION
sudo ldconfig sudo ldconfig
export CUDA_HOME=/usr/local/cuda export CUDA_HOME=/usr/local/cuda
export PATH=/usr/local/cuda/bin:$PATH export PATH=/usr/local/cuda/bin:$PATH
......
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