Scalable distributed reinforcement learning agents on kubernetes
Scalable reinforcement learning agents on container orchestration
Implement scalable reinforcement learning agent on the container orchestraion system like k8s.
This example will introduce a clear way to deploy scalable reinforcement learning agents to the computing clusters.
$ git clone https://github.com/chris-chris/haiku-scalable-example
$ cd haiku-scalable-example
$ pip install -r requirements.txt
$ python learner_server.py
$ GRPC_HOST=localhost:50051 python actor_client.py &
$ GRPC_HOST=localhost:50051 python actor_client.py &
prepare
$ docker pull chrisai/haiku-scalable-example-learner:test
$ docker pull chrisai/haiku-scalable-example-actor:test
$ docker network create --subnet 172.20.0.0/16 --ip-range 172.20.240.0/20 multi-host-network
run
$ docker run -d -p 127.0.0.1:50051:50051 --network=multi-host-network --ip=172.20.240.1 chrisai/haiku-scalable-example-learner:test
$ docker run -d --env GRPC_HOST=172.20.240.1:50051 --network=multi-host-network chrisai/haiku-scalable-example-actor:test
wanna see logs?
$ docker ps
$ docker attach [CONTAINER ID]
https://kubernetes.io/docs/tasks/tools/install-minikube/
$ kubectl apply -f impala.yml
$ kubectl logs -f impala learner
$ kubectl logs -f impala actor
I used Deepmind's open sources haiku, rlax, and google jax