Building Tensorflow r1.12 with Cuda 10 on Ubuntu 18.04










2














I really have tried getting built. I have followed the instructions here and here and here. Clean system:



  • Ubuntu 18.04 server

  • Ubuntu Gnome

  • Cuda 10.0

  • cuDNN 7.4.1

  • NCCL 2.3.7

  • TensorRT 5.0.2.1

  • Tensorflow r1.12

  • Python 3.6


  • GCC 7.3.0
    using the command line:



    bazel build --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_package



This is the error:



WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/devel/software/tensorflow/tools/bazel.rc
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=171
ERROR: Config value cuda is not defined in any .rc file


Anybody know which parts of bazel.rc the need to be imported?



Why is cuda not defined?



If I try:



bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/...



It fails with this error:



ERROR: /devel/software/tensorflow/tensorflow/python/BUILD:3768:1: Linking of rule '//tensorflow/python:_pywrap_tensorflow_internal.so' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/k8-opt/bin/tensorflow/python/_pywrap_tensorflow_internal.so -Wl,--version-script bazel-out/k8-opt/bin/tensorflow/python/pywrap_tensorflow_internal_versionscript.lds ... (remaining 65 argument(s) skipped)



Anyone had success? (Obviously at least 2 people have) Maybe someone could tell me what I am doing wrong? Or how to get this built?










share|improve this question























  • Some success. I know this is not Windows but a reboot helped. Fails now with this error: ERROR: /devel/software/tensorflow/tensorflow/BUILD:592:1: Executing genrule //tensorflow:tensorflow_python_api_gen failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped) Cannot use --config=cuda and cannot use --config=mkl Anyone know why?
    – AeroClassics
    Nov 11 '18 at 23:07







  • 1




    The original error "ERROR: Config value cuda is not defined in any .rc file", is an error only seen if using Bazel 0.19.0, try using Bazel 0.18.0 to build. And I would remove the --config=mkl, since you want the operations to be done on the gpu.
    – William D. Irons
    Nov 12 '18 at 3:50










  • @William D. Irons - Thank you! That was the answer. Very much obliged. Doug
    – AeroClassics
    Nov 12 '18 at 19:34















2














I really have tried getting built. I have followed the instructions here and here and here. Clean system:



  • Ubuntu 18.04 server

  • Ubuntu Gnome

  • Cuda 10.0

  • cuDNN 7.4.1

  • NCCL 2.3.7

  • TensorRT 5.0.2.1

  • Tensorflow r1.12

  • Python 3.6


  • GCC 7.3.0
    using the command line:



    bazel build --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_package



This is the error:



WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/devel/software/tensorflow/tools/bazel.rc
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=171
ERROR: Config value cuda is not defined in any .rc file


Anybody know which parts of bazel.rc the need to be imported?



Why is cuda not defined?



If I try:



bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/...



It fails with this error:



ERROR: /devel/software/tensorflow/tensorflow/python/BUILD:3768:1: Linking of rule '//tensorflow/python:_pywrap_tensorflow_internal.so' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/k8-opt/bin/tensorflow/python/_pywrap_tensorflow_internal.so -Wl,--version-script bazel-out/k8-opt/bin/tensorflow/python/pywrap_tensorflow_internal_versionscript.lds ... (remaining 65 argument(s) skipped)



Anyone had success? (Obviously at least 2 people have) Maybe someone could tell me what I am doing wrong? Or how to get this built?










share|improve this question























  • Some success. I know this is not Windows but a reboot helped. Fails now with this error: ERROR: /devel/software/tensorflow/tensorflow/BUILD:592:1: Executing genrule //tensorflow:tensorflow_python_api_gen failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped) Cannot use --config=cuda and cannot use --config=mkl Anyone know why?
    – AeroClassics
    Nov 11 '18 at 23:07







  • 1




    The original error "ERROR: Config value cuda is not defined in any .rc file", is an error only seen if using Bazel 0.19.0, try using Bazel 0.18.0 to build. And I would remove the --config=mkl, since you want the operations to be done on the gpu.
    – William D. Irons
    Nov 12 '18 at 3:50










  • @William D. Irons - Thank you! That was the answer. Very much obliged. Doug
    – AeroClassics
    Nov 12 '18 at 19:34













2












2








2


1





I really have tried getting built. I have followed the instructions here and here and here. Clean system:



  • Ubuntu 18.04 server

  • Ubuntu Gnome

  • Cuda 10.0

  • cuDNN 7.4.1

  • NCCL 2.3.7

  • TensorRT 5.0.2.1

  • Tensorflow r1.12

  • Python 3.6


  • GCC 7.3.0
    using the command line:



    bazel build --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_package



This is the error:



WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/devel/software/tensorflow/tools/bazel.rc
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=171
ERROR: Config value cuda is not defined in any .rc file


Anybody know which parts of bazel.rc the need to be imported?



Why is cuda not defined?



If I try:



bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/...



It fails with this error:



ERROR: /devel/software/tensorflow/tensorflow/python/BUILD:3768:1: Linking of rule '//tensorflow/python:_pywrap_tensorflow_internal.so' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/k8-opt/bin/tensorflow/python/_pywrap_tensorflow_internal.so -Wl,--version-script bazel-out/k8-opt/bin/tensorflow/python/pywrap_tensorflow_internal_versionscript.lds ... (remaining 65 argument(s) skipped)



Anyone had success? (Obviously at least 2 people have) Maybe someone could tell me what I am doing wrong? Or how to get this built?










share|improve this question















I really have tried getting built. I have followed the instructions here and here and here. Clean system:



  • Ubuntu 18.04 server

  • Ubuntu Gnome

  • Cuda 10.0

  • cuDNN 7.4.1

  • NCCL 2.3.7

  • TensorRT 5.0.2.1

  • Tensorflow r1.12

  • Python 3.6


  • GCC 7.3.0
    using the command line:



    bazel build --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_package



This is the error:



WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/devel/software/tensorflow/tools/bazel.rc
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=171
ERROR: Config value cuda is not defined in any .rc file


Anybody know which parts of bazel.rc the need to be imported?



Why is cuda not defined?



If I try:



bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/...



It fails with this error:



ERROR: /devel/software/tensorflow/tensorflow/python/BUILD:3768:1: Linking of rule '//tensorflow/python:_pywrap_tensorflow_internal.so' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/k8-opt/bin/tensorflow/python/_pywrap_tensorflow_internal.so -Wl,--version-script bazel-out/k8-opt/bin/tensorflow/python/pywrap_tensorflow_internal_versionscript.lds ... (remaining 65 argument(s) skipped)



Anyone had success? (Obviously at least 2 people have) Maybe someone could tell me what I am doing wrong? Or how to get this built?







python-3.x tensorflow






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 '18 at 21:10









talonmies

59.1k17128196




59.1k17128196










asked Nov 11 '18 at 19:18









AeroClassics

584312




584312











  • Some success. I know this is not Windows but a reboot helped. Fails now with this error: ERROR: /devel/software/tensorflow/tensorflow/BUILD:592:1: Executing genrule //tensorflow:tensorflow_python_api_gen failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped) Cannot use --config=cuda and cannot use --config=mkl Anyone know why?
    – AeroClassics
    Nov 11 '18 at 23:07







  • 1




    The original error "ERROR: Config value cuda is not defined in any .rc file", is an error only seen if using Bazel 0.19.0, try using Bazel 0.18.0 to build. And I would remove the --config=mkl, since you want the operations to be done on the gpu.
    – William D. Irons
    Nov 12 '18 at 3:50










  • @William D. Irons - Thank you! That was the answer. Very much obliged. Doug
    – AeroClassics
    Nov 12 '18 at 19:34
















  • Some success. I know this is not Windows but a reboot helped. Fails now with this error: ERROR: /devel/software/tensorflow/tensorflow/BUILD:592:1: Executing genrule //tensorflow:tensorflow_python_api_gen failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped) Cannot use --config=cuda and cannot use --config=mkl Anyone know why?
    – AeroClassics
    Nov 11 '18 at 23:07







  • 1




    The original error "ERROR: Config value cuda is not defined in any .rc file", is an error only seen if using Bazel 0.19.0, try using Bazel 0.18.0 to build. And I would remove the --config=mkl, since you want the operations to be done on the gpu.
    – William D. Irons
    Nov 12 '18 at 3:50










  • @William D. Irons - Thank you! That was the answer. Very much obliged. Doug
    – AeroClassics
    Nov 12 '18 at 19:34















Some success. I know this is not Windows but a reboot helped. Fails now with this error: ERROR: /devel/software/tensorflow/tensorflow/BUILD:592:1: Executing genrule //tensorflow:tensorflow_python_api_gen failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped) Cannot use --config=cuda and cannot use --config=mkl Anyone know why?
– AeroClassics
Nov 11 '18 at 23:07





Some success. I know this is not Windows but a reboot helped. Fails now with this error: ERROR: /devel/software/tensorflow/tensorflow/BUILD:592:1: Executing genrule //tensorflow:tensorflow_python_api_gen failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped) Cannot use --config=cuda and cannot use --config=mkl Anyone know why?
– AeroClassics
Nov 11 '18 at 23:07





1




1




The original error "ERROR: Config value cuda is not defined in any .rc file", is an error only seen if using Bazel 0.19.0, try using Bazel 0.18.0 to build. And I would remove the --config=mkl, since you want the operations to be done on the gpu.
– William D. Irons
Nov 12 '18 at 3:50




The original error "ERROR: Config value cuda is not defined in any .rc file", is an error only seen if using Bazel 0.19.0, try using Bazel 0.18.0 to build. And I would remove the --config=mkl, since you want the operations to be done on the gpu.
– William D. Irons
Nov 12 '18 at 3:50












@William D. Irons - Thank you! That was the answer. Very much obliged. Doug
– AeroClassics
Nov 12 '18 at 19:34




@William D. Irons - Thank you! That was the answer. Very much obliged. Doug
– AeroClassics
Nov 12 '18 at 19:34












1 Answer
1






active

oldest

votes


















1














Do as what is said in the warning and it will work.



"WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/devel/software/tensorflow/tools/bazel.rc"


You should have a file .bazelrc at /devel/software/tensorflow/.bazelrc. At the top of this file add the following code snippet.



import /devel/software/tensorflow/tools/bazel.rc


Enjoy!






share|improve this answer




















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53252286%2fbuilding-tensorflow-r1-12-with-cuda-10-on-ubuntu-18-04%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Do as what is said in the warning and it will work.



    "WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
    /devel/software/tensorflow/tools/bazel.rc"


    You should have a file .bazelrc at /devel/software/tensorflow/.bazelrc. At the top of this file add the following code snippet.



    import /devel/software/tensorflow/tools/bazel.rc


    Enjoy!






    share|improve this answer

























      1














      Do as what is said in the warning and it will work.



      "WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
      /devel/software/tensorflow/tools/bazel.rc"


      You should have a file .bazelrc at /devel/software/tensorflow/.bazelrc. At the top of this file add the following code snippet.



      import /devel/software/tensorflow/tools/bazel.rc


      Enjoy!






      share|improve this answer























        1












        1








        1






        Do as what is said in the warning and it will work.



        "WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
        /devel/software/tensorflow/tools/bazel.rc"


        You should have a file .bazelrc at /devel/software/tensorflow/.bazelrc. At the top of this file add the following code snippet.



        import /devel/software/tensorflow/tools/bazel.rc


        Enjoy!






        share|improve this answer












        Do as what is said in the warning and it will work.



        "WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
        /devel/software/tensorflow/tools/bazel.rc"


        You should have a file .bazelrc at /devel/software/tensorflow/.bazelrc. At the top of this file add the following code snippet.



        import /devel/software/tensorflow/tools/bazel.rc


        Enjoy!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 16 '18 at 12:37









        Vishruit Kulshreshtha

        729




        729



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53252286%2fbuilding-tensorflow-r1-12-with-cuda-10-on-ubuntu-18-04%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Darth Vader #20

            How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

            Ondo