File tree 3 files changed +27
-8
lines changed
3 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ compiler:
5
5
cache :
6
6
directories :
7
7
- $HOME/OpenBlasInstall
8
- sudo : false
8
+ sudo : required
9
9
env :
10
10
- TORCH_LUA_VERSION=LUAJIT21
11
11
- TORCH_LUA_VERSION=LUA51
@@ -48,7 +48,9 @@ before_script:
48
48
- export INSTALL_PREFIX=~/torch/install
49
49
- ls $HOME/OpenBlasInstall/lib || (cd /tmp/ && git clone https://github.com/xianyi/OpenBLAS.git -b master && cd OpenBLAS && (make NO_AFFINITY=1 -j$(getconf _NPROCESSORS_ONLN) 2>/dev/null >/dev/null) && make PREFIX=$HOME/OpenBlasInstall install)
50
50
- git clone https://github.com/torch/distro.git ~/torch --recursive
51
+ - sudo -E $ROOT_TRAVIS_DIR/travis_cuda_install.sh
51
52
script :
53
+ - export PATH=/usr/local/cuda/bin/:$PATH
52
54
- cd ~/torch && ./install.sh -b
53
55
- source ~/torch/install/bin/torch-activate
54
56
- ./test.sh
Original file line number Diff line number Diff line change 42
42
$LUA -laudio -e " print('audio loaded succesfully')"
43
43
fi
44
44
45
- # CUDA tests
46
- set +e
47
- path_to_nvcc=$( which nvcc)
48
- path_to_nvidiasmi=$( which nvidia-smi)
49
- set -e
50
-
51
- if [ -x " $path_to_nvcc " ] || [ -x " $path_to_nvidiasmi " ]
45
+ if ` $LUA -lcutorch -e " " `
52
46
then
53
47
$LUA -lcutorch -e " print('cutorch loaded succesfully')"
54
48
$LUA -lcunn -e " print('cunn loaded succesfully')"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+
3
+ if [[ ` uname` == ' Linux' ]]; then
4
+ CUDA_VERSION=6-5
5
+ CUDA_URL=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.5-14_amd64.deb
6
+ CUDA_FILE=/tmp/cuda_install.deb
7
+
8
+ curl $CUDA_URL -o $CUDA_FILE
9
+ dpkg -i $CUDA_FILE
10
+ rm -f $CUDA_FILE
11
+ apt-get -y update
12
+ apt-get -y install \
13
+ cuda-core-${CUDA_VERSION} \
14
+ cuda-cublas-${CUDA_VERSION} \
15
+ cuda-cublas-dev-${CUDA_VERSION} \
16
+ cuda-cudart-${CUDA_VERSION} \
17
+ cuda-cudart-dev-${CUDA_VERSION} \
18
+ cuda-curand-${CUDA_VERSION} \
19
+ cuda-curand-dev-${CUDA_VERSION} \
20
+ cuda-cusparse-${CUDA_VERSION} \
21
+ cuda-cusparse-dev-${CUDA_VERSION}
22
+ ln -s /usr/local/cuda-6.5 /usr/local/cuda
23
+ fi
You can’t perform that action at this time.
0 commit comments