Skip to content

Docker Diet: shrink images 80% and CI runtimes 50%#140

Merged
chrispsommers merged 55 commits intosonic-net:mainfrom
chrispsommers:chris-saithrift4
Jul 21, 2022
Merged

Docker Diet: shrink images 80% and CI runtimes 50%#140
chrispsommers merged 55 commits intosonic-net:mainfrom
chrispsommers:chris-saithrift4

Conversation

@chrispsommers
Copy link
Copy Markdown
Collaborator

Refactored into multiple dockerfiles with smaller single-purpose images. Total size shrunk from 12.4GB initial image to 2.6GB, CI build time is <2 min instead of 4min mainly due to reduced docker pull times.

chrissommers/dash-p4c-bmv2          220701        7666a1aebede   3 hours ago         632MB
chrissommers/dash-bmv2-bldr         220630        4a4d042d0c24   24 hours ago        991MB
chrissommers/dash-saithrift-bldr    220625        90c05b660fe6   6 days ago          1.1GB

Temporary - this draft PR has modified p4 code in dash_pipeline.p4 to loop packets back out same port by default, may change before finalizing.

…to merge eventually. Meanwhile can locally modify SAI makefiles.
…n dist tarball to /usr/lib inside container so can be extracted for deployment to a host.
…brary image and selectively copying to BMV2 builder/runtime image based on available p4lang docker image.
@chrispsommers chrispsommers changed the title Optimize Docker images to decrease sizes and speed up CI. Optimize Docker images to shrink files and CI runtimes Jul 2, 2022
@chrispsommers chrispsommers changed the title Optimize Docker images to shrink files and CI runtimes Docker Diet: shrink images 75% and CI runtimes 50% Jul 2, 2022
@chrispsommers chrispsommers changed the title Docker Diet: shrink images 75% and CI runtimes 50% Docker Diet: shrink images 80% and CI runtimes 50% Jul 3, 2022
…eproject/SAI#1514.

Once merged, we can change back to upstream branch of SAI.
…mplates which add static_cast to avoid type mismatches due to sai extensions.
…num Long error. TODO: P4RT libs missing, otherwise sai-thrift server builds.
…odel (P4RUntime SetForwardingPipelineRequest) to allow explicit switch intialization via P4Runtime. Removed sudo from most Make commands. READMEs.
…. Executes chmod as required. Permanent fix will require some Docker mods.
@chrispsommers chrispsommers merged commit 3c1d634 into sonic-net:main Jul 21, 2022
@chrispsommers chrispsommers deleted the chris-saithrift4 branch July 25, 2022 15:44
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