Improbable-AI / walk-these-ways

Sim-to-real RL training and deployment tools for the Unitree Go1 robot.
https://gmargo11.github.io/walk-these-ways/
Other
488 stars 129 forks source link

I wonder how the image file "deployment_image.tar" was created. Could you tell me more about the process of making it? #74

Closed XanderWangXY closed 2 weeks ago

XanderWangXY commented 3 months ago

I wonder how the image file "deployment_image.tar" was created. Could you tell me more about the process of making it?

gmargo11 commented 2 weeks ago

It's a zipped docker image. You can build the same docker image locally using the following steps:

cd go1_gym_deploy/docker
sudo make clean-build

After the build finishes, check the list of docker images by running:

sudo docker images

You should see the image named jetson-model-deployment with tag latest in the list. Finally, you can run the executable

./zip_image.sh

from the docker folder which will compress this image into deployment_image.tar.

There are a few points to keep in mind:

  1. You need to run the sudo make clean-build command on a Jetson computer. This is because Jetson uses the ARM architecture. Most other PCs use AMD architecture and the build will fail on these.
  2. The docker image is built from the instructions in the Dockerfile file. If you want to install additional packages in the docker image e.g. from pip or apt, you can do so by appending the Dockerfile and rebuilding.

-Gabe