TuxML / tuxml

The main repository of the TuxML project contains the scripts for building Linux kernel configurations in the large.
Apache License 2.0
4 stars 2 forks source link

Cannot rebuild Docker images after modifying pythons scripts #21

Closed FabienZa closed 3 years ago

FabienZa commented 3 years ago

After many tests, I confirm abnormal behavior during the generation of Docker images with the script : docker_management/docker_image_tuxml.py

Indeed, the modifications to the scripts contained in the folder compilation are never found when creating the Docker images.

More, even the complete deletion of the folder compilation, does not prevent the docker_image_tuxml.py script from working. The script can regenerate a docker image locally that uses the scripts initially present in this folder while this one no longer exists.

For these different reasons I suspect a possible "cache" problem but it may be something else.

I am experiencing this same problem on two machines, one running Ubuntu Server, the other running CentOS. Tsang Shum Yuen experiences the same problem.

But ! @anthonyamiard was very successful in modifying the script files and creating Docker images with the modifications by using a strictly identical procedure.

This assumes that there may be some specific configuration or environment required for this script to function properly.

Also, I propose to work on the "debugging" of this script or at least to try to obtain a more detailed understanding of it in order to solve this problem.

FAMILIAR-project commented 3 years ago

Thanks, you're right we need to fix this. Maybe @mipicard has an idea, I'm pretty sure we have discussed this issue and I've experienced it as well. Can't remember how, but it was a problem with options. -t dev -f if I well remember and then --local for kernel_generator.

Have you tried to remove Docker images with docker rmi? In order to have a "clean" image

As a side note, I'm wondering whether we can use "volumes" to mount python scripts into the Python image. It won't create a new image, but you can run an existing one (the current one) with the good scripts. something like docker run -v $(pwd)/compilation:/TuxML/compilation tuxml/tuxml:dev

FabienZa commented 3 years ago

I tried these commands :

docker stop $(docker ps -a -q); 
docker rm $(docker ps -a -q); 
docker rmi $(docker images -q); 

python3 docker_management/docker_image_tuxml.py -f; 
python3 kernel_generator.py --dev --local --tiny 1

And many others variants, my changes are not reflected in the program... I can even delete the whole compilation folder and the script : docker_image_tuxml.py still works, so... the script don't use my local code ?

I try to find a fix, but actually I'm totaly blocked.

FabienZa commented 3 years ago

Problem solved !

The problem came from the installBusyBox.sh script which was not found when generating the tuxml/basetuxml docker image.

This created a chain reaction that blocked the generation of the other images that could not find the local image. The generation used the online images on DockerHub and not the non-existent local images.

So when launching the kernel_generator.py script, the local image used was not include the local modifications.

The problem is related to the "end of line" character used in the file. This is a problem specific to the combined use of Windows and Linux for development and therefore does not require "fix" of the souce code, but should be documented because it is very fast and easy to solve it.