Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Environment Executable don't work in Azure VM

Discussion in 'ML-Agents' started by lin_cheng_TDSE, Jun 18, 2020.

  1. lin_cheng_TDSE

    lin_cheng_TDSE

    Joined:
    Apr 16, 2020
    Posts:
    7
    I tried using Environment Executable for training on local Windows and Linux, and it worked really great.
    But when I follow the same process in Azure VM, the Environment Executable(the game) just quit immediately, and ml-agents cannot connect with the Environment Executable.

    I also tried two methods to build the Environment Executable, one is directly build in Azure VM ,and the other is build in host computer, then transfer the Environment Executable to Azure VM. Both methods failed the same way as before.

    Is there any workaround here?
     
  2. celion_unity

    celion_unity

    Joined:
    Jun 12, 2019
    Posts:
    289
    Are there any logs from the executable? Can you try running it directly (without mlagents-learn) and pass "-logFile -", or pass "--env-args -logFile -" to mlagents-learn? That should print the logs to the console.

    If you can't run the executable outside of mlagents-learn, there's not much we can do to help in this forum...
     
  3. lin_cheng_TDSE

    lin_cheng_TDSE

    Joined:
    Apr 16, 2020
    Posts:
    7
    Thanks for reply.
    Follow your steps, I got this one below.
    I think the problem isn't the ml-agents...does this mean I don't have openGL?
    If so, that's weird, I did install it...
    I will try reinstall it.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
    Set current directory to /home/lin/Desktop/game
    Found path: /home/lin/Desktop/game/game.x86_64
    Mono path[0] = '/home/lin/Desktop/game/game_Data/Managed'
    Mono config path = '/home/lin/Desktop/game/game_Data/MonoBleedingEdge/etc'
    PlayerConnection initialized from /home/lin/Desktop/game/game_Data (debug = 0)
    PlayerConnection initialized network socket : 0.0.0.0 55481
    Multi-casting "[IP] 10.0.0.5 [Port] 55481 [Flags] 2 [Guid] 826630503 [EditorId] 802499258 [Version] 1048832 [Id] LinuxPlayer(10.0.0.5) [Debug] 0 [PackageName] LinuxPlayer [ProjectName] UnityEnvironment" to [225.0.0.222:54997]...
    Started listening to [0.0.0.0:55481]
    Preloaded 'lib_burst_generated.so'
    Preloaded 'libgrpc_csharp_ext.x64.so'
    PlayerConnection already initialized - listening to [0.0.0.0:55481]
    Display 0 'rdp0': 1920x1080 (primary device).
    Desktop is 1920 x 1080 @ 50 Hz
    Invalid initial resolution 80 x 80 - forcing to 100 x 100
    Unable to find a supported OpenGL core profile
    Failed to create valid graphics context: please ensure you meet the minimum requirements
    E.g. OpenGL core profile 3.2 or later for OpenGL Core renderer
    Vulkan detection: 0
    No supported renderers found, exiting
    (Filename: ./PlatformDependent/LinuxStandalone/main.cpp Line: 618)
     
  4. celion_unity

    celion_unity

    Joined:
    Jun 12, 2019
    Posts:
    289
    Sorry, I'm not sure the best way to solve this. There's a similar problem described here https://github.com/Unity-Technologies/ml-agents/issues/1464

    If you don't use visual observations, you should be able to add "-batchmode -nographics" to the Unity commandline (or equivalently, "--no-graphics" to the mlagents-learn commandline) to hopefully bypass this.
     
    kpalko and lin_cheng_TDSE like this.
  5. lin_cheng_TDSE

    lin_cheng_TDSE

    Joined:
    Apr 16, 2020
    Posts:
    7
    Thanks for your reply. I will give it a try next Monday.
     
  6. lin_cheng_TDSE

    lin_cheng_TDSE

    Joined:
    Apr 16, 2020
    Posts:
    7
    I solve the problem by using the instruction given here.
    And also, I have to export the Environment Executable in headless mode.
    Thanks for your help.