You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You appear to be missing MuJoCo. We expected to find the file here:
/root/.mujoco/mujoco200
This package only provides python bindings, the library must be installed separately.
Please follow the instructions on the README to install MuJoCo
https://github.com/openai/mujoco-py#install-mujoco
Which can be downloaded from the website
https://www.roboti.us/index.html
2023-11-15 19:30:18,405 WARNING utils.py:538 -- Detecting docker specified CPUs. In previous versions of Ray, CPU detection in containers was incorrect. Please ensure that Ray has enough CPUs allocated. As a temporary workaround to revert to the prior behavior, set `RAY_USE_MULTIPROCESSING_CPU_COUNT=1` as an env var before starting Ray. Set the env var: `RAY_DISABLE_DOCKER_CPU_WARNING=1` to mute this warning.
2023-11-15 19:30:19,649 WARNING function_runner.py:599 -- Function checkpointing is disabled. This may result in unexpected behavior when using checkpointing features or certain schedulers. To enable, set the train function arguments to be `func(config, checkpoint_dir=None)`.
2023-11-15 19:30:19,655 INFO logger.py:618 -- pip install "ray[tune]" to see TensorBoard files.
2023-11-15 19:30:19,656 WARNING callback.py:126 -- The TensorboardX logger cannot be instantiated because either TensorboardX or one of it's dependencies is not installed. Please make sure you have the latest version of TensorboardX installed: `pip install -U tensorboardx`
2023-11-15 19:34:04,050 INFO utils.py:519 -- Detected RAY_USE_MULTIPROCESSING_CPU_COUNT=1: Using multiprocessing.cpu_count() to detect the number of CPUs. This may be inconsistent when used inside docker. To correctly detect CPUs, unset the env var: `RAY_USE_MULTIPROCESSING_CPU_COUNT`.
2023-11-15 19:34:15,814 WARNING function_runner.py:599 -- Function checkpointing is disabled. This may result in unexpected behavior when using checkpointing features or certain schedulers. To enable, set the train function arguments to be `func(config, checkpoint_dir=None)`.
2023-11-15 19:34:15,823 INFO logger.py:618 -- pip install "ray[tune]" to see TensorBoard files.
2023-11-15 19:34:15,824 WARNING callback.py:126 -- The TensorboardX logger cannot be instantiated because either TensorboardX or one of it's dependencies is not installed. Please make sure you have the latest version of TensorboardX installed: `pip install -U tensorboardx`
2023-11-15 19:34:15,825 WARNING trial_runner.py:288 -- The maximum number of pending trials has been automatically set to the number of available cluster CPUs, which is high (140 CPUs/pending trials). If you're running an experiment with a large number of trials, this could lead to scheduling overhead. In this case, consider setting the `TUNE_MAX_PENDING_TRIALS_PG` environment variable to the desired maximum number of concurrent trials.
The text was updated successfully, but these errors were encountered:
创建激活环境
创建Conda 环境,这里取Python3.7,因为这是TensorFlow 1.X 的最后支持版本,之后的Python只能用TensorFlow 2.0之后的版本了。2.0 大改,很多老代码用不了。
conda 重新初始化一下。
激活刚刚创建的环境
TensorFlow 和 Pytorch 安装
输入代码
nvidia-smi
,看一下Cuda最高支持到哪里。因为我是租用的云服务器,所以我这里不用安装驱动。安装步骤请参考其他人。TensorFlow
先安装
TensorFlow
可以在链接这里参考各个版本TensorFlow对应的Cuda版本,还有cuDNN,一般说来最好就按着官方说明装,但是我们后面要装一个较新版本的Pytorch,所以Cuda安装10.2版本的。
先查询查询一下安装没有
这里没有安装,不过有没有安装其实无所谓,还是需要自己装。
先搜索一下
cudatoolkit
有哪些版本。安装10.2版本的
接下来安装
cudnn
根据build一栏里对应的cuda版本,这里选择7.6.5版本的
cudnn
。然后如果你愿意可以检查一下
接下来安装1.15版本的
tensorflow_gpu
Pytorch
接下来安装Pytorch
在官网查询有
对应安装代码是
这是因为 polixir/OfflineRL 用到了
torch.nn.init.trunc_normal_
函数。如果前面安装cuda10.0的话,cuda10.0的Pytorch只支持到1.2.0。在
torch.nn.init
里查询commit记录,最终定位到2020年5月。根据日期查询release,那么PyTorch的版本是至少要大于1.5.1的
此时的1.5.1已经支持cuda10.2了,因为随着版本更新,PyTorch对计算性能也有优化,不如一步到位更新到cuda10.2所能支持的最高版本。
Mujoco
先将
Mujoco
和mujoco-py
安装上,这里安装200版本的。先安装依赖
然后安装强化学习所需要的一些包。setuptools版本过高安装有些东西会报错,然后cython版本过高也是无法编译mujoco,
这一步会出现错误提示,需要将Mujoco安装到指定位置:
这里下载Mujoco本体。
这里 下载许可证。其实Openai收购Mujoco后,Gym在某一个版本的更新中就已经不需要Mujoco-py了。直接下载链接
我推荐用FileZilla传文件更快,可以本地先试着配置好了,然后在传到服务器端安装。
再配置一下环境变量
vim ~/.bashrc
在末尾加入:
然后输入
:wq
(保存并退出),再source ~/.bashrc
关闭重启命令行。pip3 install -r requirements.txt pip3 install -r requirements.dev.txt pip install -e .
再执行命令安装
如果
mujoco-py
无法正常安装(其实很有可能),请在Github的release里,手动下载源码到服务器,然后执行命令这样应该就没问题了。也可以本地试试先满足requirements.dev.txt,之后pip应该可以直接安装了。
D4RL
先安装一些前置包
先安装
mjrl
然后再安装
d4rl
请将mjrl后面那一段删掉,否则不能正常安装。
再执行命令安装
pip install -e .
OfflineRL
安装
neorl
和OfflineRL
:请注意,安装OfflineRL前有这三个地方需要修改:
改fire的原因我忘了。
scikit-learn是因为sklearn已经被deprecated了。
ray是因为不改会有 #7 的问题。
现在试一下运行效果
这个问题可能比较罕见,因为我只有一个GPU我直接简单粗暴的指定为 0 了。
依然是版本问题。我前面没有指定
protobuf
安装特定版本是因为有一堆冲突的,最后安装它来覆盖。1
再来试试运行效果
同 #4 ,感谢 @linhlpv 。
同时也可以看见运行时会提示运行提示缺少CARLA和Flow,那是因为这两个库官方文档中给出说明是要额外安装的。
其他问题(尚未解决)
The text was updated successfully, but these errors were encountered: