-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,40 @@ | ||
TODO | ||
# Guide for Training DreamerV2 on CarDreaner | ||
|
||
This guide assumes you have installed ``car_dreamer``. If not, please follow the instructions in the [main README](../README.md). | ||
|
||
First, install the required dependencies for DreamerV2: | ||
```bash | ||
cd dreamerv2 | ||
conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit | ||
pip install -r requirements.txt | ||
``` | ||
|
||
Set up CARLA and environment variables: | ||
```bash | ||
export CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)")) | ||
export CUSOLVER_PATH=$(dirname $(python -c "import nvidia.cusolver;print(nvidia.cusolver.__file__)")) | ||
export LD_LIBRARY_PATH=$CUDNN_PATH/lib:$CUSOLVER_PATH/lib:$CONDA_PREFIX/lib:$LD_LIBRARY_PATH | ||
``` | ||
|
||
## Training | ||
|
||
Execute the training script with desired configurations: | ||
```bash | ||
cd .. | ||
bash train_dm2.sh 2000 0 --task carla_four_lane --dreamerv2.logdir ./logdir/carla_four_lane | ||
``` | ||
|
||
``2000`` is the port number of the CARLA server. The script will automatically start the server so you don't need to start it manually. | ||
``0`` is the GPU number. | ||
``--task`` is the name of the task and ``--dreamerv2.logdir`` is the directory to save the training logs. For a complete list of tasks and their configurations, please refer to the [documentation](https://car-dreamer.readthedocs.io/en/latest/tasks.html). | ||
|
||
## Visualization | ||
|
||
Online data monitoring can be accessed on website on ``http://localhost:9000/``, where the port number should be changed to ``<carla-port> + 7000`` if you don't use the default port number ``2000`` for CARLA server. | ||
|
||
Offline data logging can be accessed through TensorBoard: | ||
```bash | ||
tensorboard --logdir ./logdir/carla_four_lane | ||
``` | ||
|
||
Go to ``http://localhost:6006/`` in your browser to see the output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cloudpickle==3.0.0 | ||
crafter==1.8.3 | ||
gym==0.12.5 | ||
dm_control==1.0.18 | ||
jax==0.4.26 | ||
jaxlib==0.4.26 | ||
numpy==1.24.3 | ||
optax==0.2.2 | ||
rich==13.7.1 | ||
ruamel.yaml==0.18.6 | ||
tensorflow[and-cuda]==2.15.1 | ||
tensorflow_probability==0.23.0 | ||
scikit-image==0.23.2 | ||
ffmpeg==1.4 | ||
moviepy==1.0.3 | ||
imageio==2.34.1 | ||
wandb==0.16.6 | ||
opencv-python>=4.9,<5.0 | ||
shapely==1.8.4 | ||
carla==0.9.15 | ||
matplotlib==3.8.4 | ||
tabulate==0.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters