在Docker容器上加载TensorFlow权重

我有一个运行TensorFlow Graph的Python脚本,我想在Docker容器中运行这个脚本。

我使用“load”函数(在TensorFlow中)从文件加载权重。 基本上我有这些文件:

  • InceptionCnnModel_Intent350.data 00000-的-00001
  • InceptionCnnModel_Intent350.index
  • InceptionCnnModel_Intent350.meta

我运行以下命令:

model.load('lib/InceptionCnnModel_Intent350') 

如果我在我的本地机器上运行脚本,它的工作(我有预期的结果)。 如果我在docker文件中运行脚本,它不起作用。 它不工作,因为它不会在model.load之后不打印任何东西,而且这也是(Docker容器的)控制台中的输出:

 2017-06-27 13:13:44.265722: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-06-27 13:13:44.265769: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-06-27 13:13:44.265779: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-06-27 13:13:44.265787: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-06-27 13:13:44.265793: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. <tflearn.models.dnn.DNN object at 0x7fe64b5c8cc0> >>> Looking fo lib/InceptionCnnModel_Intent350 Killed 

我的docker容器是python:3.6-slim。

任何想法如何解决这个问题?