tensorflow-gpu failed init from systemd service

2019-07-25 03:39发布

I have wrote an application with Java / C / Python who works well since a few weeks and executed in Bash by:

source ../frozen-graph-env/bin/activate && /usr/bin/java -jar test.jar --start

pip freeze of my environment:

absl-py==0.2.2
astor==0.6.2
bleach==1.5.0
gast==0.2.0
grpcio==1.12.1
html5lib==0.9999999
Markdown==2.6.11
numpy==1.14.5
pkg-resources==0.0.0
protobuf==3.6.0
six==1.11.0
tensorboard==1.6.0
tensorflow-gpu==1.6.0
termcolor==1.1.0
Werkzeug==0.14.1

The goal now is to execute the application with systemd:

ExecStart=/bin/bash -c "source ../frozen-graph-env/bin/activate && /usr/bin/java -jar test.jar --start"

The Java application start then exit because tensorflow-gpu failed to be imported. I have no log in systemd / syslog to show it (not the best way to start a new question, sorry) but if I replace tensorflow-gpu 1.6.0 by tensorflow 1.6.0, i.e. without GPU support, the application works well.

I'm importing tensorflow in my python script with: import tensorflow as tf

Is it the same issue of tensorflow gpu failed init from systemd service - Stack Overflow?

Is there a specific way to use tensorflow-gpu with systemd? Is it an issue? How can I help to investigate?

System information

OS Platform and Distribution: Linux Ubuntu 16.04
TensorFlow installed from pip
TensorFlow version: v1.6.0-0-gd2e24b6039 1.6.0
TensorFlow GPU version: v1.6.0-0-gd2e24b6039 1.6.0

0条回答
登录 后发表回答