This Docker image contains a robot learning algorithm called C2F-ARM. The Docker image is intended to simplify creating and running various configurations for training UR5e robot arm to perform grasping tasks.
To get a local copy up and running, follow these steps.
- The container is based on Docker, so you need to install Docker first.
- Clone the repo
git clone https://github.com/RQC-Robotics/rl_docker.git
- Change director
cd rl_docker/
- Build Docker image
sudo docker build -t c2farm-rqc:v01 .
- Run Docker container
sudo docker run --privileged -p 6006:6006 --name c2farm-rqc --rm -ti --gpus all c2farm-rqc:v01
- Change Ngrok address and port in ./ARM/arm/env_client.py
vi ./ARM/arm/env_client.py
- Run server script on the Robot server at Lab
python server_c2farm.py
- Upload zip archive with demos to Yandex Object Storage (c2farm folder)
You can skip this step depending on your use case. The demos used in this container are already available at this link: https://rl-docker.storage.yandexcloud.net/c2farm/myDemoKinect-v01.zip
- Run training process using Docker container console.
source run_c2farm_training.sh myDemoKinect-v01.zip The first passing parameter to the script should be the name of a zip archive with demos (See step 7) or a string 'skip_demos' to avoid downloading demos.
The Docker container includes a Tensorboard visualization toolkit. To get access to the web interface of Tensorboard, you need to forward port 6006 to your local machine port:
$ ssh -L 6007:localhost:6006 -f -N user@ip_address
The user is a user name, and the ip_address is the machine's address with the running Docker container.
The Docker container has the nvitop program, an interactive NVIDIA device and process monitoring tool. To run the nvitop, connect to a container's bash shell and run the monitor_gpu.sh script.
sudo docker exec -it c2farm-rqc bash
source monitor_gpu.sh
To make the built Docker image available for colleagues and the team, the Yandex Container Registry should be used. To do this, please follow these steps.
-
Authenticate in Yandex Container Registry using Docker Credential helper
-
Assign the local Docker image a tag in the following format:
cr.yandex/<registry ID>/<Docker image name>:<tag>:
docker tag c2farm-rqc:v01 cr.yandex/crppjen8sto7ua2il13b/c2farm-rqc:v001
-
Push the Docker image to the Yandex Container Registry repository
docker push cr.yandex/crppjen8sto7ua2il13b/c2farm-rqc:v001
-
Run the Docker image
docker run --privileged -p 6006:6006 --name c2farm-rqc --rm -ti --gpus all cr.yandex/crppjen8sto7ua2il13b/c2farm-rqc:v001
-
Remove the Docker image from the repository
yc container image delete <IMAGE-ID>
More commands for managing Container resources in the Yandex Container Registry are presented here.