Skip to content

Commit 0270401

Browse files
authored
Merge pull request FloopCZ#205 from FloopCZ/tf-2.2.0
Update TensorFlow to v2.2.0, drop static library support
2 parents 784dd71 + 48b8d6b commit 0270401

22 files changed

+145
-494
lines changed

Dockerfiles/BAZEL_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.26.1
1+
2.0.0
File renamed without changes.
File renamed without changes.

Dockerfiles/archlinux-static

Lines changed: 0 additions & 9 deletions
This file was deleted.

Dockerfiles/install-archlinux.sh

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
set -e
33

44
# parse command line arguments
5-
6-
shared=false
75
cuda=false
86

97
for key in "$@"; do
108
case $key in
11-
--shared)
12-
shared=true
13-
;;
149
--cuda)
1510
cuda=true
1611
;;
@@ -28,20 +23,19 @@ pacman -Syu --noconfirm --needed \
2823
python-numpy \
2924
wget
3025

31-
if $shared; then
32-
pacman -S --noconfirm --needed \
33-
java-environment=8 \
34-
libarchive \
35-
protobuf \
36-
unzip \
37-
zip
38-
export BAZEL_VERSION=${BAZEL_VERSION:-`cat ./tensorflow_cc/Dockerfiles/BAZEL_VERSION`}
39-
bazel_installer=bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
40-
wget -P /tmp https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${bazel_installer}
41-
chmod +x /tmp/${bazel_installer}
42-
/tmp/${bazel_installer}
43-
rm /tmp/${bazel_installer}
44-
fi
26+
pacman -S --noconfirm --needed \
27+
java-environment=8 \
28+
libarchive \
29+
protobuf \
30+
unzip \
31+
zip
32+
export BAZEL_VERSION=${BAZEL_VERSION:-`cat ./tensorflow_cc/Dockerfiles/BAZEL_VERSION`}
33+
bazel_installer=bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
34+
wget -P /tmp https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${bazel_installer}
35+
chmod +x /tmp/${bazel_installer}
36+
/tmp/${bazel_installer}
37+
rm /tmp/${bazel_installer}
38+
4539
if $cuda; then
4640
pacman -S --noconfirm --needed \
4741
cuda \

Dockerfiles/install-common.sh

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22
set -e
33
cwd="`pwd`"
44

5-
### parse command line arguments ###
6-
7-
shared=false
8-
9-
for key in "$@"; do
10-
case $key in
11-
--shared)
12-
shared=true
13-
;;
14-
esac
15-
done
16-
175
### prepare an unprivileged user
186

197
groupadd -r tensorflow_cc
@@ -30,16 +18,11 @@ chown -R tensorflow_cc:tensorflow_cc tensorflow_cc/tensorflow_cc/build
3018
chmod go+rX tensorflow_cc/tensorflow_cc/build
3119
cd tensorflow_cc/tensorflow_cc/build
3220

33-
# configure only shared or only static library
34-
if $shared; then
35-
cmake -DTENSORFLOW_STATIC=OFF -DTENSORFLOW_SHARED=ON ..;
36-
else
37-
cmake ..;
38-
fi
39-
4021
# build and install
22+
cmake ..
4123
make
4224
rm -rf /home/tensorflow_cc/.cache
25+
rm -rf /root/.cache
4326
make install
4427
cd "$cwd"
4528
rm -rf tensorflow_cc/tensorflow_cc/build

Dockerfiles/install-ubuntu.sh

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
set -e
33

44
# parse command line arguments
5-
6-
shared=false
75
cuda=false
86

97
for key in "$@"; do
108
case $key in
11-
--shared)
12-
shared=true
13-
;;
149
--cuda)
1510
cuda=true
1611
;;
@@ -39,16 +34,15 @@ apt-get -y install \
3934
sudo \
4035
wget
4136

42-
if $shared; then
43-
# install bazel for the shared library version
44-
export BAZEL_VERSION=${BAZEL_VERSION:-`cat ./tensorflow_cc/Dockerfiles/BAZEL_VERSION`}
45-
apt-get -y install pkg-config zip g++ zlib1g-dev unzip python
46-
bazel_installer=bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
47-
wget -P /tmp https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${bazel_installer}
48-
chmod +x /tmp/${bazel_installer}
49-
/tmp/${bazel_installer}
50-
rm /tmp/${bazel_installer}
51-
fi
37+
# install bazel
38+
export BAZEL_VERSION=${BAZEL_VERSION:-`cat ./tensorflow_cc/Dockerfiles/BAZEL_VERSION`}
39+
apt-get -y install pkg-config zip g++ zlib1g-dev unzip python
40+
bazel_installer=bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
41+
wget -P /tmp https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${bazel_installer}
42+
chmod +x /tmp/${bazel_installer}
43+
/tmp/${bazel_installer}
44+
rm /tmp/${bazel_installer}
45+
5246
if $cuda; then
5347
# install libcupti
5448
apt-get -y install cuda-command-line-tools-10-1
File renamed without changes.
File renamed without changes.

Dockerfiles/ubuntu-static

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)