motional / nuplan-devkit

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

Question about docker image running #186

Closed CrisCloseTheDoor closed 1 year ago

CrisCloseTheDoor commented 1 year ago

Hi developers:

I met the error after docker images successfully built:

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

My COMMAND:

docker build --network host -f Dockerfile.submission . -t nuplan-evalservice-server:test.contestant
docker-compose up --build
CrisCloseTheDoor commented 1 year ago

At the same time, the simulation container also reported the same error, both containers reported the lack of data in container


simulation_1  | Global seed set to 0
simulation_1  | INFO:nuplan.planning.script.builders.main_callback_builder:Building MultiMainCallback...
simulation_1  | INFO:matplotlib.font_manager:generated new fontManager
simulation_1  | INFO:nuplan.planning.script.builders.main_callback_builder:Building MultiMainCallback: 4...DONE!
simulation_1  | 2022-11-23 07:34:35,018 INFO {/nuplan_devkit/nuplan/planning/script/builders/worker_pool_builder.py:19}  Building WorkerPool...
simulation_1  | 2022-11-23 07:34:35,019 INFO {/nuplan_devkit/nuplan/planning/utils/multithreading/worker_pool.py:101}  Worker: Sequential
simulation_1  | 2022-11-23 07:34:35,019 INFO {/nuplan_devkit/nuplan/planning/utils/multithreading/worker_pool.py:102}  Number of nodes: 1
simulation_1  | Number of CPUs per node: 1
simulation_1  | Number of GPUs per node: 0
simulation_1  | Number of threads across all nodes: 1
simulation_1  | 2022-11-23 07:34:35,019 INFO {/nuplan_devkit/nuplan/planning/script/builders/worker_pool_builder.py:27}  Building WorkerPool...DONE!
simulation_1  | 2022-11-23 07:34:35,019 INFO {/nuplan_devkit/nuplan/planning/script/builders/folder_builder.py:29}  Building experiment folders...
simulation_1  | 2022-11-23 07:34:35,019 INFO {/nuplan_devkit/nuplan/planning/script/builders/folder_builder.py:32}  
simulation_1  | 
simulation_1  |     Folder where all results are stored: /home/PJLAB/heyixiang/nuplan/nuplan1.0/nuplan/exp/exp/simulation_open_loop_boxes/2022.11.23.07.34.32
simulation_1  | 
simulation_1  | 2022-11-23 07:34:35,020 INFO {/nuplan_devkit/nuplan/planning/script/builders/folder_builder.py:63}  Building experiment folders...DONE!
simulation_1  | 2022-11-23 07:34:35,020 INFO {/nuplan_devkit/nuplan/planning/script/builders/scenario_building_builder.py:18}  Building AbstractScenarioBuilder...
simulation_1  | Error executing job with overrides: ['+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']
simulation_1  | Traceback (most recent call last):
simulation_1  |   File "/opt/conda/envs/nuplan/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target
simulation_1  |     return target(*args, **kwargs)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/scenario_builder/nuplan_db/nuplan_scenario_builder.py", line 65, in __init__
simulation_1  |     self._db_files = discover_log_dbs(data_root if db_files is None else db_files)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/scenario_builder/nuplan_db/nuplan_scenario_filter_utils.py", line 150, in discover_log_dbs
simulation_1  |     db_filenames = get_db_filenames_from_load_path(load_path)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/scenario_builder/nuplan_db/nuplan_scenario_filter_utils.py", line 121, in get_db_filenames_from_load_path
simulation_1  |     assert Path(load_path).is_file(), f'Local db path does not exist: {load_path}'
simulation_1  | AssertionError: Local db path does not exist: /data/sets/nuplan/nuplan-v1.1/mini/2021.07.16.20.45.29_veh-35_01095_01486.db
simulation_1  | 
simulation_1  | During handling of the above exception, another exception occurred:
simulation_1  | 
simulation_1  | Traceback (most recent call last):
simulation_1  |   File "/nuplan_devkit/nuplan/planning/script/run_simulation.py", line 100, in main
simulation_1  |     run_simulation(cfg=cfg)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/script/run_simulation.py", line 54, in run_simulation
simulation_1  |     scenario_builder = build_scenario_builder(cfg=cfg)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/script/builders/scenario_building_builder.py", line 19, in build_scenario_builder
simulation_1  |     scenario_builder = instantiate(cfg.scenario_builder)
simulation_1  |   File "/opt/conda/envs/nuplan/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 180, in instantiate
simulation_1  |     return instantiate_node(config, *args, recursive=_recursive_, convert=_convert_)
simulation_1  |   File "/opt/conda/envs/nuplan/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 249, in instantiate_node
simulation_1  |     return _call_target(target, *args, **kwargs)
simulation_1  |   File "/opt/conda/envs/nuplan/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 64, in _call_target
simulation_1  |     raise type(e)(
simulation_1  |   File "/opt/conda/envs/nuplan/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target
simulation_1  |     return target(*args, **kwargs)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/scenario_builder/nuplan_db/nuplan_scenario_builder.py", line 65, in __init__
simulation_1  |     self._db_files = discover_log_dbs(data_root if db_files is None else db_files)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/scenario_builder/nuplan_db/nuplan_scenario_filter_utils.py", line 150, in discover_log_dbs
simulation_1  |     db_filenames = get_db_filenames_from_load_path(load_path)
simulation_1  |   File "/nuplan_devkit/nuplan/planning/scenario_builder/nuplan_db/nuplan_scenario_filter_utils.py", line 121, in get_db_filenames_from_load_path
simulation_1  |     assert Path(load_path).is_file(), f'Local db path does not exist: {load_path}'
simulation_1  | AssertionError: Error instantiating 'nuplan.planning.scenario_builder.nuplan_db.nuplan_scenario_builder.NuPlanScenarioBuilder' : Local db path does not exist: /data/sets/nuplan/nuplan-v1.1/mini/2021.07.16.20.45.29_veh-35_01095_01486.db
simulation_1  | 
simulation_1  | Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
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)
···