Testing agent in local with docker

#1

I followed the instruction in README.md.
I successfully built docker image.

I run docker image with tow terminals as described in Run Docker image section.
The agent looks good and it waits for the environment.
When I run the environment, anything happens.
Below are my console messages for both.

Agent

root
INFO:mlagents_envs:Start training by pressing the Play button in the Unity Editor.
Traceback (most recent call last):
  File "run.py", line 27, in <module>
    env = ObstacleTowerEnv(args.environment_filename, docker_training=args.docker_training)
  File "/srv/conda/lib/python3.6/site-packages/obstacle_tower_env.py", line 45, in __init__
    timeout_wait=timeout_wait)
  File "/srv/conda/lib/python3.6/site-packages/mlagents_envs/environment.py", line 69, in __init__
    aca_params = self.send_academy_parameters(rl_init_parameters_in)
  File "/srv/conda/lib/python3.6/site-packages/mlagents_envs/environment.py", line 491, in send_academy_parameters
    return self.communicator.initialize(inputs).rl_initialization_output
  File "/srv/conda/lib/python3.6/site-packages/mlagents_envs/rpc_communicator.py", line 80, in initialize
    "The Unity environment took too long to respond. Make sure that :\n"
mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
	 The environment does not need user interaction to launch
	 The Academy and the External Brain(s) are attached to objects in the Scene
	 The environment and the Python interface have compatible versions.

Environment

+ ENV_PORT=
+ ENV_FILENAME=
+ '[' -z '' ']'
+ ENV_PORT=5005
+ '[' -z '' ']'
+ ENV_FILENAME=/home/otc/ObstacleTower/obstacletower.x86_64
+ touch otc_out.json
+ APP_PID=7
+ xvfb-run --auto-servernum '--server-args=-screen 0 640x480x24' /home/otc/ObstacleTower/obstacletower.x86_64 --port 5005 2
+ TAIL_PID=8
+ wait 7
+ tail -f otc_out.json
0 Likes

#2

The user-name in build.sh, aicrowd, is inconsistent to the default value “/home/otc/…”.

try this

In another terminal window, execute the environment.

docker run
–env OTC_EVALUATION_ENABLED=true
–env OTC_DEMO_EVALUATION=true
–network=host
-it obstacle_tower_challenge:latest ./env.sh 5005 ./ObstacleTower/obstacletower.x86_64

0 Likes

#3

Is the environment’s worker_id supposed to be 0 during the evaluation process?

0 Likes