Example #1
0
import doodad as dd
import doodad.ec2 as ec2
import doodad.ssh as ssh
import doodad.mount as mount
from doodad.utils import EXAMPLES_DIR, REPO_DIR


# Local docker
mode_docker = dd.mode.LocalDocker(
    image='python:3.5',
)

# or this! Run experiment via docker on another machine through SSH
mode_ssh = dd.mode.SSHDocker(
    image='python:3.5',
    credentials=ssh.SSHCredentials(hostname='my.machine.name', username='******', identity_file='~/.ssh/id_rsa'),
)

# or use this!
mode_ec2=None
#mode_ec2 = dd.mode.EC2AutoconfigDocker(
#    image='python:3.5',
#    region='us-west-1',
#    instance_type='m3.medium',
#    spot_price=0.02,
#)

MY_RUN_MODE = mode_docker  # CHANGE THIS

# Set up code and output directories
OUTPUT_DIR = '/example/outputs'  # this is the directory visible to the target
Example #2
0
import doodad.mount as mount
import doodad.ssh as ssh
from doodad.utils import EXAMPLES_DIR, REPO_DIR

# Local run
mode_local = dd.mode.Local()

# Local docker
mode_docker = dd.mode.LocalDocker(image="python:3.5", )

# or this! Run experiment via docker on another machine through SSH
mode_ssh = dd.mode.SSHDocker(
    image="python:3.5",
    credentials=ssh.SSHCredentials(
        hostname="my.machine.name",
        username="******",
        identity_file="~/.ssh/id_rsa",
    ),
)

MY_RUN_MODE = mode_docker  # CHANGE THIS

# Set up code and output directories
mounts = [
    mount.MountLocal(local_dir=REPO_DIR, pythonpath=True),  # Code
]

THIS_FILE_DIR = os.path.realpath(os.path.dirname(__file__))
dd.launch_python(
    target=os.path.join(
        THIS_FILE_DIR, "app_main.py"
Example #3
0
"""

import doodad as dd
import doodad.ssh as ssh
import doodad.mount as mount

MY_USERNAME = '******'

# Use local mode to test code
mode_local = dd.mode.LocalDocker(image='justinfu/rl_base:0.1')

# Use docker mode to launch jobs on newton machine
mode_ssh = dd.mode.SSHDocker(
    image='justinfu/rl_base:0.1',
    credentials=ssh.SSHCredentials(hostname='newton2.banatao.berkeley.edu',
                                   username='******',
                                   identity_file='path/to/identity'),
)

# Set up code and output directories
OUTPUT_DIR = '/mount/outputs'  # this is the directory visible to the target script inside docker
mounts = [
    mount.MountLocal(local_dir='~/install/rllab',
                     pythonpath=True),  # point to your rllab
    mount.MountLocal(local_dir='~/install/gym/.mujoco',
                     mount_point='/root/.mujoco'),  # point to your mujoco

    # this output directory will be visible on the remote machine
    # TODO: this directory will have root permissions. For now you need to scp your data inside your script.
    mount.MountLocal(local_dir='~/data/%s' % MY_USERNAME,
                     mount_point=OUTPUT_DIR,
import os

import doodad as pd
import doodad.ssh as ssh
import doodad.mount as mount
from doodad.ec2.credentials import AWSCredentials

THIS_FILE_DIR = os.path.dirname(os.path.realpath(__file__))
REPO_DIR = os.path.dirname(THIS_FILE_DIR)

# or this! Run experiment via docker on another machine through SSH
mode_ssh = pd.mode.SSHDocker(
    image='vitchyr/rllab-vitchyr:latest',
    credentials=ssh.SSHCredentials(hostname='newton4.banatao.berkeley.edu',
                                   username='******',
                                   identity_file='~/.ssh/rail_lab_0617'),
)

mode_local = pd.mode.LocalDocker(image='vitchyr/rllab-vitchyr:latest', )

credentials = AWSCredentials(from_env=True)
mode_ec2 = pd.mode.EC2SpotDocker(
    credentials,
    image='vitchyr/rllab-vitchyr:latest',
    region='us-west-1',
    instance_type='c4.large',
    spot_price=0.03,
    s3_bucket="2-12-2017.railrl.vitchyr.rail.bucket",
    terminate=True,
    image_id="ami-ad81c8cd",
    aws_key_name="rllab-vitchyr-us-west-1",
Example #5
0
BASE_DIR_MOUNT = './'
DOODAD_DIR = '~/install/doodad'
DATA_DIR_MOUNT = './data'
DATA_DIR_LOCAL = './data'
THIS_FILE_DIR = os.path.realpath(os.path.dirname(__file__))
CELEBA_DIR = './data/celeba'

GPU_ID = args.gpu_id

# Local docker
mode_docker = dd.mode.LocalDocker(image=IMAGE, gpu=True, gpu_id=GPU_ID)

# Run experiment via docker on another machine through SSH
mode_ssh = dd.mode.SSHDocker(image=IMAGE,
                             credentials=ssh.SSHCredentials(
                                 hostname='kelvinxx',
                                 username='******',
                                 identity_file='~/.ssh/id_rsa'))

# change this based on desired mode!
MY_RUN_MODE = mode_docker

# add mounts as necessary, e.g. code from other directories
mounts = [
    mount.MountLocal(local_dir=DOODAD_DIR, pythonpath=True),  # add doodad
    mount.MountLocal(local_dir=BASE_DIR_LOCAL, mount_point=BASE_DIR_MOUNT),
    mount.MountLocal(local_dir=DATA_DIR_LOCAL, mount_point=DATA_DIR_MOUNT),
    mount.MountLocal(local_dir=CELEBA_DIR, mount_point=CELEBA_DIR),
    mount.MountLocal(local_dir=OUTPUT_DIR_LOCAL,
                     mount_point=OUTPUT_DIR_MOUNT,
                     output=True),  # output mount
]
Example #6
0
    gcp_bucket_name='umrl',
    instance_type='n1-standard-8',
    image_name='gpu-docker',
    image_project='umrl-228204',
    disk_size='100',
    terminate=True,
    preemptible=False,
    gcp_log_prefix='experiment',
    gpu=True,
    gpu_kwargs=dict(num_gpu=1, gpu_model='nvidia-tesla-k80'),
    image='kylehsu/umrl:latest'
)

mode_ssh = dd.mode.SSHDocker(
    image='kylehsu/umrl:latest',
    credentials=ssh.SSHCredentials(hostname='alan.ist.berkeley.edu', username='******', identity_file='~/.ssh/id_rsa'),
)

mode = mode_gcp

mounts = [
    mount.MountLocal(local_dir=os.path.dirname(os.path.realpath(__file__)),
                     filter_dir=('output',))
]

output_dir = '/home/docker/store/umrl/output'

if mode == mode_gcp:
    output_mount = mount.MountGCP(gcp_path='output', gcp_bucket_name='umrl', mount_point=output_dir, output=True,
                                  include_types=('*.txt', '*.csv', '*.json', '*.gz', '*.tar', '*.log', '*.pkl',
                                                 '*.png', '*.html', '*.mp4'))
Example #7
0
import doodad as dd
import doodad.mount as mount
import doodad.ssh as ssh

MY_USERNAME = "******"

# Use local mode to test code
mode_local = dd.mode.LocalDocker(image="justinfu/rl_base:0.1")

# Use docker mode to launch jobs on newton machine
mode_ssh = dd.mode.SSHDocker(
    image="justinfu/rl_base:0.1",
    credentials=ssh.SSHCredentials(
        hostname="newton2.banatao.berkeley.edu",
        username="******",
        identity_file="path/to/identity",
    ),
)

# Set up code and output directories
OUTPUT_DIR = (
    "/mount/outputs"  # this is the directory visible to the target script inside docker
)
mounts = [
    mount.MountLocal(local_dir="~/install/rllab",
                     pythonpath=True),  # point to your rllab
    mount.MountLocal(local_dir="~/install/gym/.mujoco",
                     mount_point="/root/.mujoco"),  # point to your mujoco
    # this output directory will be visible on the remote machine
    # TODO: this directory will have root permissions. For now you need to scp your data inside your script.