加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
launch.py 850 Bytes
一键复制 编辑 原始数据 按行查看 历史
十指紧扣 提交于 2023-11-14 00:41 . init
"""
Launch an experiment on local machine with docker
"""
import sys
import doodad as dd
import doodad.ssh as ssh
import doodad.mount as mount
mode_local = dd.mode.LocalDocker(
image='rakelly/rlkit:latest'
)
# Set up code and output directories
OUTPUT_DIR = 'output' # doodad will prepend `/mounts` to this, set config in code to output to this path
mounts = [
mount.MountLocal(local_dir='~/rlkit', pythonpath=True), # point to your code
mount.MountLocal(local_dir='~/.mujoco', mount_point='/root/.mujoco'), # point to your mujoco
mount.MountLocal(local_dir='~/rlkit/output', mount_point=OUTPUT_DIR, output=True),
]
call = sys.argv[1] + ' 1' # assume script has arg for docker mode
dd.launch_python(
target=call, # call target script (absolute path)
mode=mode_local,
mount_points=mounts,
verbose=True,
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化