-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtensorflow.sh
More file actions
25 lines (19 loc) · 798 Bytes
/
tensorflow.sh
File metadata and controls
25 lines (19 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version=r1.5
apt install python3-dev python3-pip openjdk-8-jdk
pip3 install six numpy wheel mock
pip3 install --user keras_applications==1.0.6 --no-deps
pip3 install --user keras_preprocessing==1.0.5 --no-deps
# bazel installation
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" \
| sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
apt update
apt install bazel
# Download tensoflow
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout $version
./configure
bazel build --config=opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" \
--config=cuda //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg