Skip to content

Comments

ngc-pytorch: add .dockerignore and optimize Dockerfile#330

Merged
studioego merged 1 commit intomainfrom
ngc-pytorch/docker-image-optimization
Feb 24, 2026
Merged

ngc-pytorch: add .dockerignore and optimize Dockerfile#330
studioego merged 1 commit intomainfrom
ngc-pytorch/docker-image-optimization

Conversation

@Yaminyam
Copy link
Member

Add vendor/ngc-pytorch/.dockerignore and refactor the Dockerfile to reduce image size and layers. Changes include chaining apt commands, running apt-get clean and removing /var/lib/apt/lists, consolidating Python package installs (requirements + datasets + mpi4py + mlflow), removing temporary build artifacts (/tmp, OpenBLAS sources, pip wheel/requirement leftovers), removing Python pycache directories, combining git-lfs and bashtop installation steps, adding additional cleanup after JupyterLab build, and small housekeeping tweaks (sed/terminfo). These edits aim to produce a smaller, cleaner build image with fewer intermediate layers.

Add vendor/ngc-pytorch/.dockerignore and refactor the Dockerfile to reduce image size and layers. Changes include chaining apt commands, running apt-get clean and removing /var/lib/apt/lists, consolidating Python package installs (requirements + datasets + mpi4py + mlflow), removing temporary build artifacts (/tmp, OpenBLAS sources, pip wheel/requirement leftovers), removing Python __pycache__ directories, combining git-lfs and bashtop installation steps, adding additional cleanup after JupyterLab build, and small housekeeping tweaks (sed/terminfo). These edits aim to produce a smaller, cleaner build image with fewer intermediate layers.
@studioego studioego self-requested a review February 24, 2026 08:21
Copy link
Collaborator

@studioego studioego left a comment

Choose a reason for hiding this comment

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

LGTM

@studioego studioego merged commit 13146e3 into main Feb 24, 2026
2 of 4 checks passed
@studioego studioego deleted the ngc-pytorch/docker-image-optimization branch February 24, 2026 08:45
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.

2 participants