Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize the code #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

shivangvijay
Copy link
Contributor

@shivangvijay shivangvijay commented Mar 16, 2024

In issue #5 , it was discussed that a few manual commands need to be run, such as . /usr/share/gazebo/setup.bash. After merging this pull request, there will be no need for any additional actions, if you use docker. Additionally, there will be no operating system issues, as seen in the Ruby issue in Ubuntu 22 (#17 ).

Steps to build the image:-

cd benchmark
sudo docker build -t <name_of_the_image> .

command to run the container:-
sudo docker run <name_of_the_image>

@shivangvijay
Copy link
Contributor Author

shivangvijay commented Mar 16, 2024

For those who need to install docker in Ubuntu:-

Open Terminal and run the following commands:-

$ sudo apt-get update
$ sudo apt-get install curl
$ curl -fsSL https://get.docker.com/ | sh

Optional command:- To run docker commands without sudo

$ sudo usermod -aG docker <system_username>

The above command add the system username in the docker group, Restart the system to complete the process.

After restart run

$ sudo service docker start 

After getting feedback from you I'll update README to include all this steps. @scpeters @mabelzhang

@shivangvijay
Copy link
Contributor Author

Further enhancements are possible:

1.) Sometimes users need to run tests separately, such as the sphere test. Therefore, introducing a Docker Compose file with different commands for separate tests could be beneficial.
2.)Implementing a two-step Docker build process could optimize the final Docker image size. This would involve initially building the full Gazebo image and then copying only the executable into a new lightweight Docker image. However, it's worth noting that this may not provide significant advantages since both Gazebo and Gazebo files (which constitute the maximum size of the Docker image) are required during runtime.

What's your thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant