motional / nuplan-devkit

The devkit of the nuPlan dataset.
https://www.nuplan.org
Other
674 stars 129 forks source link

How long does it take to complete simulation within docker image? #182

Closed CrisCloseTheDoor closed 1 year ago

CrisCloseTheDoor commented 1 year ago

Hi developers: I run the docker container, but it takes 13 hours and still doesn't finished. The information displayed is shown in the figure below. How long does it take through a complete simulation within docker? 1668652890076

My command: create the image

docker build --network host -f Dockerfile.submission . -t nuplan-evalservice-server:test.contestant

run the container

docker run --name nuplan-evalservice-server -d -v ./:/nuplan_devkit -p 9902:9902 nuplan-evalservice-server:test.contestant
CrisCloseTheDoor commented 1 year ago

Is that program just waiting for something, not running simulation?

gianmarco-motional commented 1 year ago

Hi @CrisCloseTheDoor! You need two containers running at the same time, one running the trajectory computation server (i.e. your planner) and one running the simulation (reading your trajectory and providing the next observation). You only ran the trajectory computation one.

I would suggest you to use the docker-compose file to simplify starting the simulation.

If all goes well, you should see the ouput of the simulation as if you were running the script outside Docker (with some additional info saying which service is producing the messages)

gianmarco-motional commented 1 year ago

You can find the related documentation here. I will close the issue, feel free to re-open if you encounter problems! :slightly_smiling_face:

CrisCloseTheDoor commented 1 year ago

You can find the related documentation here. I will close the issue, feel free to re-open if you encounter problems! 🙂

Thanks for your reply. I use the docker-compose up --build command, however, when images are built, error occures:

Step 47/47 : CMD ["/nuplan_devkit/nuplan/entrypoint_simulation.sh"]
 ---> Using cache
 ---> 9ce3d8aa6e80
Successfully built 9ce3d8aa6e80
Successfully tagged nuplan/nuplan:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Recreating nuplan_devkit_submission_1 ... done
Recreating nuplan_devkit_simulation_1 ... done
Attaching to nuplan_devkit_submission_1, nuplan_devkit_simulation_1
simulation_1  | Traceback (most recent call last):
simulation_1  |   File "/nuplan_devkit/nuplan/planning/script/run_simulation.py", line 5, in <module>
simulation_1  |     import hydra
simulation_1  | ModuleNotFoundError: No module named 'hydra'
simulation_1  | ERROR conda.cli.main_run:execute(41): `conda run python -u nuplan/planning/script/run_simulation.py +simulation=open_loop_boxes planner=[remote_planner] worker=sequential scenario_builder=nuplan_challenge scenario_filter=nuplan_challenge_scenarios scenario_builder.db_files=/data/sets/nuplan/nuplan-v1.1/mini/2021.07.16.20.45.29_veh-35_01095_01486.db scenario_filter.limit_total_scenarios=1 contestant_id=test submission_id=contestant` failed. (See above for error)
nuplan_devkit_simulation_1 exited with code 1
submission_1  | Global seed set to 0
submission_1  | INFO:nuplan.submission.submission_planner:Submission container starting with port 50051
submission_1  | INFO:nuplan.submission.submission_planner:Server starting...
submission_1  | INFO:nuplan.submission.submission_planner:Server started!

It looks like when simulation is running the conda environment isn't actived, because 'hydra' is lost...

gianmarco-motional commented 1 year ago

@CrisCloseTheDoor Can you open a new issue with this and assign it to me (or ping me)? Just for better tracking, I'll look into it.

CrisCloseTheDoor commented 1 year ago

@CrisCloseTheDoor Can you open a new issue with this and assign it to me (or ping me)? Just for better tracking, I'll look into it.

OK, I opende a new issue here for this problem #186