Fork Autoware_AI repository and create docker image

@staff hello
Autoware_AI currently does not include some vehicles that I wish to use to work with python API. I need to make some changes into the code, modify launch files, etcto make my simulation based on Autoware_AI repository https://github.com/Autoware-AI/docker…

It is not feasible change the code, let it inside shared_dir ( folder with access to my desktop and to the docker) and every time when I build the standard Autoware_AI image to remove and add the modified package folders with my coding modifications.

For this reason I wish to fork the original github packages a little bit, and afterwards create an image based on my fork and not based on the original repo.

As a solution to work on my codes I was trying to use a branch. However when I exit docker image to turn off PC, the branch does not exist anymore. Then when I entry again in docker image:

./run.sh -t 1.14.0

The image will build the standard configured docker image and the created branch no longer exist!

Wha would be the best option do be done? Could you please provide a good tutorial for this case ?

Thanks in advance!

Hi,

The fastest option is that once you are happy with the docker image, you save it.

Have a look at this tutorial: How to Create a Docker Image From a Container | Scalyr

1 Like

Hi @duckfrost thanks very much for the tutorial! I have reproduced it on my pc. Afterwards I tried to apply the concepts to modify, commit and save the modified Autoware_AI docker image for futher create a new container based on this custom image.

Unfortunately when I try to add a text file for Autoware_AI running container, in order to modify it, the Autoware_AI running container does not appear as option. As you can see below in the right side (bottom) terminal:

I have just as external option to access Autoware.Auto images path and the nginx image (from this tutorial link you passed). Unfortunately docker command does not work inside the running container terminal…

However you can check in right upper terminal or in left bottom terminal the Autoware_AI container is running with the name ( autoware/autoware: 1.14.0-melodic-cuda).
Different from AutowareAuto project that I used to issue the cmd:

$ ade --rc .aderc-amd64-foxy start --update --enter

Then the image was built and I further accessed it.

In Autoware_AI I need to run a .sh entrypoint:

$ ./run.sh -t 1.14.0

For me this command sounds that I am executing a program (.sh) and not actually running a container ??? Not completely understood the difference. And I am still stuck to be able to modify the Autoware/src packages present inside this “image” and then save this image for further creation of a modified container.

Do I need to make another install type of Autoware_AI project? I mean build from source on my OS? I thought just docker would be enough…besides that I am using ubuntu 20.04 and I know that Autoware_AI stopped just on Ubuntu 18.04 (I am almost sure I will have broken pkgs, compatibility issues if I try to install on ubuntu 20.04).

Do you have any other idea how to solve this issue?

I believe I need to do something similar to this:

But I am not sure exactly what and how (the commands).

Thanks

@duckfrost as the previous attempts failed I tried this tutorial: How to Commit Changes to a Docker Image (With Example)

And it worked pretty good, and I was able to create a new image based on Autoware_AI container. However after all the steps done below, I got an error “connection refused” to launch Autoware_AI packages. From your experience what do you think can be done to get access to their server with a custom_image (not their official one)?

1: Extracted the image_ID and runned with docker cmd:

!

2: Modified the original docker container adding a .txt file (just to test):
added_txt

3: Added a commit to the image:

4: Tried to use the contents of the image ( runtime manager interface)

However I was not allowed to use, compared to when I run their original container (left side of terminal) with the run .sh -t 1.14.0 command

Would you know why? I cannot find a solution for that

Thanks in advance

I have finally found a solution for that. It is completely described here:

https://answers.ros.org/question/376512/fork-autoware_ai-repository-and-create-docker-image/?answer=377314#post-id-377314