DataTap Tensorflow Support

Tensorflow images support DataTaps by:

  1. Placing the shared library in the /opt/bludata/ directory.
  2. Installing and configuring the necessary Hadoop package.
  3. Configuring required environment variables.

After creating a virtual cluster with a Tensorflow image, log in to one of the virtual nodes/containers in that cluster, and then verify basic I/O functionality by executing the following commands in a Python shell:

import tensorflow as tf

import os


#check CXX11_ABI_FLAG

from tensorflow.python.framework.versionsimport CXX11_ABI_FLAG

CXX11_ABI_FLAG


#load bdfs shared library

bdfs_file_system_library= os.path.join("/opt/bluedata","libbdfs_file_system_shared_r1_13.so")

tf.load_library(bdfs_file_system_library)


#write to a test file

with tf.gfile.Open("dtap://TenantStorage/tensorflow/dtap.txt", 'w') as f:

    f.write("This is the dtaptest file")


#read from the test file

with tf.gfile.Open("dtap://TenantStorage/tensorflow/dtap.txt", 'r') as f:

    content = f.read()

# show the connect of the file

Content