File tree Expand file tree Collapse file tree 1 file changed +29
-22
lines changed
Expand file tree Collapse file tree 1 file changed +29
-22
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4- # install requirements
5- export DEBIAN_FRONTEND=noninteractive
6- apt-get -y update
7- apt-get -y install \
8- cmake \
9- g++-7 \
10- git \
11- python3-dev \
12- python3-numpy \
13- sudo \
14- wget
4+ if [[ " $OSTYPE " == " linux-gnu" ]]; then
5+ # install requirements
6+ export DEBIAN_FRONTEND=noninteractive
7+ apt-get -y update
8+ apt-get -y install \
9+ cmake \
10+ g++-7 \
11+ git \
12+ python3-dev \
13+ python3-numpy \
14+ sudo \
15+ wget
1516
16- # install bazel
17- export BAZEL_VERSION=${BAZEL_VERSION:- `cat ./ Dockerfiles/ BAZEL_VERSION`}
18- apt-get -y install pkg-config zip g++ zlib1g-dev unzip python
19- bazel_installer=bazel-${BAZEL_VERSION} -installer-linux-x86_64.sh
20- wget -P /tmp https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION} /${bazel_installer}
21- chmod +x /tmp/${bazel_installer}
22- /tmp/${bazel_installer}
23- rm /tmp/${bazel_installer}
17+ # install bazel
18+ export BAZEL_VERSION=${BAZEL_VERSION:- `cat ./ Dockerfiles/ BAZEL_VERSION`}
19+ apt-get -y install pkg-config zip g++ zlib1g-dev unzip python
20+ bazel_installer=bazel-${BAZEL_VERSION} -installer-linux-x86_64.sh
21+ wget -P /tmp https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION} /${bazel_installer}
22+ chmod +x /tmp/${bazel_installer}
23+ /tmp/${bazel_installer}
24+ rm /tmp/${bazel_installer}
2425
25- if [[ ${BUILD_WITH_CUDA:- " OFF" } == " ON" ]]; then
26- # install libcupti
27- apt-get -y install cuda-command-line-tools-10-1
26+ if [[ ${BUILD_WITH_CUDA:- " OFF" } == " ON" ]]; then
27+ # install libcupti
28+ apt-get -y install cuda-command-line-tools-10-1
29+ fi
30+
31+ else
32+ echo " This script supports only Debian-based operating systems (like Ubuntu)." \
33+ " Please consult README file for manual installation on your '$OSTYPE ' OS."
34+ exit 1
2835fi
You can’t perform that action at this time.
0 commit comments