Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit 1eb176b

Browse files
author
Alexandre Lissy
committed
Move to upstream TensorFlow for Docker
1 parent a0a9415 commit 1eb176b

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3636
# Install NCCL 2.2
3737
RUN apt-get install -qq -y --allow-downgrades --allow-change-held-packages libnccl2=2.2.13-1+cuda9.0 libnccl-dev=2.2.13-1+cuda9.0
3838

39-
RUN dpkg -L libnccl2
40-
RUN dpkg -L libnccl-dev
41-
4239

4340
# Install Bazel
4441
RUN apt-get install -y openjdk-8-jdk
@@ -146,8 +143,6 @@ COPY . /DeepSpeech/
146143

147144
WORKDIR /DeepSpeech
148145

149-
RUN ls -hal
150-
151146
RUN pip --no-cache-dir install -r requirements.txt
152147

153148
# Link DeepSpeech native_client libs to tf folder
@@ -176,20 +171,27 @@ RUN bazel build -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-mt
176171
# Build DeepSpeech
177172
RUN bazel build --config=monolithic --config=cuda -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-mtune=generic --copt=-march=x86-64 --copt=-msse --copt=-msse2 --copt=-msse3 --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx --copt=-fvisibility=hidden //native_client:libdeepspeech.so //native_client:generate_trie --verbose_failures --action_env=LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
178173

179-
# Build TF pip package
180-
RUN bazel build --config=opt --config=cuda --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-mtune=generic --copt=-march=x86-64 --copt=-msse --copt=-msse2 --copt=-msse3 --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx //tensorflow/tools/pip_package:build_pip_package --verbose_failures --action_env=LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
181-
182-
# Build wheel
183-
RUN bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
184-
185-
# Install tensorflow from our custom wheel
186-
RUN pip install /tmp/tensorflow_pkg/*.whl
174+
###
175+
### Using TensorFlow upstream should work
176+
###
177+
# # Build TF pip package
178+
# RUN bazel build --config=opt --config=cuda --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-mtune=generic --copt=-march=x86-64 --copt=-msse --copt=-msse2 --copt=-msse3 --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx //tensorflow/tools/pip_package:build_pip_package --verbose_failures --action_env=LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
179+
#
180+
# # Build wheel
181+
# RUN bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
182+
#
183+
# # Install tensorflow from our custom wheel
184+
# RUN pip install /tmp/tensorflow_pkg/*.whl
187185

188186
# Copy built libs to /DeepSpeech/native_client
189187
RUN cp /tensorflow/bazel-bin/native_client/libctc_decoder_with_kenlm.so /DeepSpeech/native_client/ \
190188
&& cp /tensorflow/bazel-bin/native_client/generate_trie /DeepSpeech/native_client/ \
191189
&& cp /tensorflow/bazel-bin/native_client/libdeepspeech.so /DeepSpeech/native_client/
192-
190+
191+
# Install TensorFlow
192+
WORKDIR /DeepSpeech/
193+
RUN pip install tensorflow-gpu==1.11.0rc2
194+
193195

194196
# Make DeepSpeech and install Python bindings
195197
ENV TFDIR /tensorflow
@@ -216,6 +218,5 @@ RUN rm -rf kenlm \
216218
&& cmake .. \
217219
&& make -j 4
218220

219-
220221
# Done
221222
WORKDIR /DeepSpeech

0 commit comments

Comments
 (0)