-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add --no-cache-dir option to pip install in Dockerfile #2739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rebase the change and fix the indent? I think this change is helpful.
Dockerfile
Outdated
@@ -96,7 +96,7 @@ RUN git clone --branch 3.8 https://github.com/colmap/colmap.git --single-branch | |||
mkdir build && \ | |||
cd build && \ | |||
cmake .. -DCUDA_ENABLED=ON \ | |||
-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indent
torch==2.0.1+cu${CUDA_VER} \ | ||
torchvision==0.15.2+cu${CUDA_VER} \ | ||
--extra-index-url https://download.pytorch.org/whl/cu${CUDA_VER} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indent
Thank you @jb-ye for your advice. I have rebased my changes on top of the latest commit and fixed the indent issues. |
LGTM |
This commit adds the
--no-cache-dir
option to thepip install
command in theDockerfile
. By including this option, the cache during Python package installation is disabled, resulting in a significant reduction (approximately 3.2GB) in disk usage duringdocker build
.Without this option, the Docker image would contain the following cache, which is unnecessary:
du -sh /home/user/.cache/pip # 3.2G /home/user/.cache/pip