Search code examples
androidtensorflowbazelwindows-subsystem-for-linux

Build Tensorflow Demo For Android


I am following this link to build the Android App:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md

I am using Window Subsystem Linux command to do this project.

I have installed Bazel already.

I know that after I install Bazel, and before I run the build command, I need to change the WORKSPACE file with correct NDK/ADK file address and go to the workspace root and run "touch WORKSPACE". Here are the codes i ran:

'tensorflow folder sits inside 'C:\Users\username\AppData\Local\lxss\home\alexluk\tensorflow
cd /home/username/tensorflow     

touch WORKSPACE

However, when i ran "touch WORKSPACE", here is the error i got:

touch: cannont touch 'WORKSPACE': onput/output error

It would be great if anyone can let me know where went wrong and what should I do.


Solution

  • For future people that might need help with this:

    It looks like Windows Subsystem Linux is very particular about not editing the Linux files from Windows. See this blog post:

    DO NOT, under ANY circumstances, create and/or modify Linux files using Windows apps, tools, scripts, consoles, etc.

    At this point, you can probably remove the file using Windows and then recreate it using Linux.