diambra / arena

DIAMBRA Arena: a New Reinforcement Learning Platform for Research and Experimentation
https://docs.diambra.ai
Other
307 stars 22 forks source link

unable to run the Diambra environment. #107

Closed sramichetty20019 closed 5 months ago

sramichetty20019 commented 5 months ago

Hi, everyone I am trying to get the Diambra arena running but I encountered the following issue; the Diambra engine starts but crashes right after , I believe it is because of the opt directory that Diambra needs access to I tried to grant the permission but it still gives me the same error is there a work around I am pasting my error below, kindly let me know how to solve this.

:~/arena/diambra$ diambra run -r /home/srinija/arena/diambra/arena/doapp python test.py ️ Starting DIAMBRA environment: ️ logged in v2.2: Pulling from diambra/engine Digest: sha256:6b5df5c9522553a4505bf0b6b0f837dd2f945de1b0b6390d83fdf24e317de643 Status: Image is up to date for diambra/engine:v2.2 Stored credentials found. Authorization granted. Server listening on 0.0.0.0:50051 ️ DIAMBRA environment started INFO:diambra.arena.engine.interface:Trying to connect to DIAMBRA Engine server (timeout=600s)... INFO:diambra.arena.engine.interface:... done. ️ (3a69) (0)Overwriting sys_settings provided by the user with command line / CLI ones (0)Provided by the user: ️ (3a69) (0)Set via command line / CLI: emu_pipes_path: "/tmp/DIAMBRA/" roms_path: "/opt/diambraArena/roms/" binary_path: "/opt/diambraArena/mame/" ️ (3a69) username: "sramichetty9"


  .:-:-**#*#####+***+=-:. 

..-++####+#################=+=:. :+############################-. .-+#############################=. .-###########################+. .=######++======++##########=. ........ ... ....... ........... ........ ........ ............ ............ ........... -=------:---------=########- .------..-----:. .------. .-----------. --------. :-------- --------------:. --------------:. :----------: .:--------:---------:=####### .------..-------..------. :-----:-----:. ---------. .--------- ------:..:-----: ------:..------: .------:-----. .:------::---::--------:+#######..------. .------..------. .------.:-----. ----------.---------- ------:..------. ------: :-----. .:-----:.------. ️ (3a69) :-----::.:---:-----::---:###### .------. .------..------. .:-----: .------. ------:-------------- ------::-----:.. ------:.-----:. .------..------. .--:.. . :::.:.---.-:---.#####- .------. .------..------. .------.::------: ------:.-----.:------ ------: :-----: ------:.:------: .------:.:-------. ..:..:::.:::.::....:.::--:####. .------::------:..------..------:.:::------. ------: .---. :-----: -------::------: ------: ------: :------..::------: .-::::::---...:--. .-.:-::=###+. .::::::::::::.. .::::::..::::::. .::::::. ::::::. .:. ::::::: ::::::::::::::. ::::::: ::::::: ::::::. .:::::: .--:. .:--...::. ..::+####: :--:.. .---:...:. .:++:. .:---:::----.. .... .:. .:------:..:... :. ....... ..:. ..

                                                               DIAMBRA™ | Dueling AI Arena
                                                          https://diambra.ai - info@diambra.ai

                               Usage of this software is subject to our Terms of Use described at https://diambra.ai/terms

                                                           DIAMBRA, Inc. © Copyright 2018-2024

(0)Environment initialization ... ️ (3a69) Error: Cannot open "/opt/diambraArena/roms/doapp.zip": No such file or directory. You need to put the Game rom file in the roms directory.


    Contact support on DIAMBRA Discord Server: https://diambra.ai/discord

️ (3a69) AND / OR Open a ticket on our GitHub repository issue Tracker: https://github.com/diambra/arena/issues


Traceback (most recent call last): File "/home/srinija/arena/diambra/arena/engine/interface.py", line 31, in env_init response = self.client.EnvInit(env_settings_pb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/myenv/lib/python3.11/site-packages/grpc/_channel.py", line 1176, in call return _end_unary_response_blocking(state, call, False, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/myenv/lib/python3.11/site-packages/grpc/_channel.py", line 1005, in _end_unary_response_blocking raise _InactiveRpcError(state) # pytype: disable=not-instantiable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.CANCELLED details = "Cannot open "/opt/diambraArena/roms/doapp.zip": No such file or directory. You need to put the Game rom file in the roms directory. " debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Cannot open \"/opt/diambraArena/roms/doapp.zip\": No such file or directory.\nYou need to put the Game rom file in the roms directory.\n", grpc_status:1, created_time:"2024-03-22T19:53:59.985307594-04:00"}"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/srinija/arena/diambra/test.py", line 3, in env = diambra.arena.make("doapp", render_mode="human") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/arena/diambra/arena/make_env.py", line 43, in make env = DiambraGym1P(env_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/arena/diambra/arena/arena_gym.py", line 222, in init super().init(env_settings) File "/home/srinija/arena/diambra/arena/arena_gym.py", line 38, in init self.env_info = self.arena_engine.env_init(self.env_settings.get_pb_request(init=True)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/arena/diambra/arena/engine/interface.py", line 33, in env_init raise Exception(CONNECTION_FAILED_ERROR_TEXT) Exception: DIAMBRA Arena failed to connect to the Engine Server. Are you running it with DIAMBRA CLI: diambra run python script.py?

See the docs (https://docs.diambra.ai) for additional details, or join DIAMBRA Discord Server (https://diambra.ai/discord) for support. ️ Couldn't run: exit status 1

alexpalms commented 5 months ago

Hi @sramichetty20019, thanks for reaching out. Have you placed the game ROM file into the roms directory?

sramichetty20019 commented 5 months ago

@alexpalms thank you so much for replying.

that's the part I was bit confused I just extracted the zip file and placed its contents in /home/srinija/arena/diambra/arena and then I ran the command diambra run -r /home/srinija/arena/diambra/arena/doapp python test.py so should I create or make directory in the /home/srinija/arena/roms and then run it? Also, if it is placed in the opt directory then wouldn't there be permission issues? Where exactly should this roms directory be?

alexpalms commented 5 months ago

@sramichetty20019 no need to unzip the file, keep it zipped, in the case of Dead or Alive, keep it as doapp.zip.

You just place the zip file itself in a folder that you will define as you "roms folder" and that you pass to the command line application using the -r parameter as you are doing.

It should solve your problem.

The opt folder is the one inside the docker container, where your roms folder is mounted.

Try this and let us know ;)

sramichetty20019 commented 5 months ago

@alexpalms thank you so much I just made the changes as mentioned and now it works perfectly well! Thank you once again.

alexpalms commented 5 months ago

We are always happy to help @sramichetty20019 ! Do not hesitate to reach out, the faster way is to connect via our Discord Server, join us at https://diambra.ai/discord