Closed huydhn closed 1 month ago
Looking at the CI results from this PR, it looks like it spent 6 minutes in 'calculate docker image' step. If I look inside there it looks like it's building the image. I guess that's automated such that it would build a new image automatically if it detected a change in the build scripts (e.g. if requirements.txt got updated), but then it hits the cache and skips the build time normally?
Re-running the job now to observe how it behaves on the second run.
on rerun, i do see the 'docker build' step go down from 6 min to 1 sec, so that's great!
but the docker pull step is taking over 3min, yesterday I was seeing 1m30s roughly, for the pytorch base image you had sent me. I wonder if this is something related to docker cache- should we expect the pull step to decrease once the same runner is used a second time and its cache is warm? if so then i think this will be alright.
Looking at the CI results from this PR, it looks like it spent 6 minutes in 'calculate docker image' step. If I look inside there it looks like it's building the image. I guess that's automated such that it would build a new image automatically if it detected a change in the build scripts (e.g. if requirements.txt got updated), but then it hits the cache and skips the build time normally?
Yup, you're right.
pytorch-linux-focal-cuda12.1-cudnn8-py3-gcc9
https://github.com/pytorch/pytorch/actions/runs/9067872180/job/24927331103?pr=125921#step:8:1, and it shows 4m49s. The image here is smaller, so I assume it would be faster to download in the long run
Adopt from PyTorch, this workflow will prepare the Docker image
torchtitan-ubuntu-20.04-clang12
for the CI.dev-requirements.txt
andrequirements.txt
. I need to move these files from the top level to.ci/docker
directory and create softlinks for them because docker build process will only take a look at.ci/docker
. This is the reason why PyTorch keeps its CI requirements file there.torchtitan-ubuntu-20.04-clang12
can then be used as the input fordocker-image
.