This repository was archived by the owner on Apr 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmukoe.yaml
106 lines (100 loc) · 3.79 KB
/
mukoe.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright 2024 Character Technologies Inc. and Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
cluster_name: mukoe
max_workers: 10
docker:
image: gcr.io/<YOUR-GCP-PROJECT-ID>/ray-muzero:cpu # Please remember to update this!
container_name: "ray_docker"
pull_before_run: True
run_options: # Extra options to pass into "docker run"
- --ulimit nofile=65536:65536
available_node_types:
ray_head_default:
min_workers: 0
max_workers: 0
resources: {"CPU": 0}
node_config:
machineType: n2-standard-4
disks:
- boot: true
autoDelete: true
type: PERSISTENT
initializeParams:
diskSizeGb: 50
sourceImage: projects/ubuntu-os-cloud/global/images/family/ubuntu-2004-lts
reverb_worker:
docker:
worker_image: gcr.io/<YOUR-PROJECT-ID>/ray-muzero:tpu
min_workers: 1
max_workers: 1
docker:
worker_run_options: ["--privileged"]
resources: {"TPU": 4, "replay_buffer": 1}
node_config:
acceleratorType: v4-8
runtimeVersion: tpu-vm-v4-base
tpu_actor:
docker:
worker_image: gcr.io/<YOUR-PROJECT-ID>/ray-muzero:tpu
min_workers: 1
max_workers: 1
docker:
worker_run_options: ["--privileged"]
resources: {"TPU": 4, "learner": 1}
node_config:
acceleratorType: v4-8
runtimeVersion: tpu-vm-v4-base
muzero_actor:
min_workers: 5
max_workers: 5
resources: {"CPU": 16, "actor": 1}
node_config:
machineType: n1-standard-16
disks:
- boot: true
autoDelete: true
type: PERSISTENT
initializeParams:
diskSizeGb: 50
sourceImage: projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts
serviceAccounts:
- email: ray-autoscaler-sa-v1@<YOUR-PROJECT-ID>.iam.gserviceaccount.com
scopes:
- https://www.googleapis.com/auth/cloud-platform
provider:
type: gcp
region: us-central2
availability_zone: us-central2-b
project_id: <YOUR-PROJECT-ID>
initialization_commands:
# Don't stall on ubuntu graphic...
#- sudo sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf
# Installs Docker if it doesn't exist
- >
if ! command -v docker &> /dev/null; then
sudo apt-get update;
curl -fsSL https://get.docker.com -o get-docker.sh;
sudo sh get-docker.sh;
else
echo "Docker is already installed.";
fi
# Sets Docker permissions
- sudo usermod -aG docker $USER
- sudo systemctl restart docker -f
# Provides auth + access to GCR
- curl -fsSL "https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.1.10/docker-credential-gcr_linux_amd64-2.1.10.tar.gz" | tar xz docker-credential-gcr && chmod +x docker-credential-gcr && sudo mv docker-credential-gcr /usr/bin/
- docker-credential-gcr configure-docker
# Specify the node type of the head node (as configured above).
head_node_type: ray_head_default