Skip to content
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

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

bro-sin
Copy link
Contributor

@bro-sin bro-sin commented Jan 9, 2024

This commit adds the --no-cache-dir option to the pip install command in the Dockerfile. By including this option, the cache during Python package installation is disabled, resulting in a significant reduction (approximately 3.2GB) in disk usage during docker 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

Copy link
Collaborator

@jb-ye jb-ye left a 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} && \
Copy link
Collaborator

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}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indent

@bro-sin bro-sin reopened this Jan 12, 2024
@bro-sin
Copy link
Contributor Author

bro-sin commented Jan 12, 2024

Could you rebase the change and fix the indent? I think this change is helpful.

Thank you @jb-ye for your advice. I have rebased my changes on top of the latest commit and fixed the indent issues.

@jb-ye
Copy link
Collaborator

jb-ye commented Jan 12, 2024

LGTM

@brentyi brentyi enabled auto-merge (squash) January 13, 2024 06:08
@brentyi
Copy link
Collaborator

brentyi commented Jan 13, 2024

thanks @bro-sin @jb-ye!

@brentyi brentyi merged commit 44dafa3 into nerfstudio-project:main Jan 13, 2024
4 checks passed
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.

3 participants