Update Dockerfile for Python 3.10 and dependencies#497
Open
omaralvarez wants to merge 1 commit intocvg:masterfrom
Open
Update Dockerfile for Python 3.10 and dependencies#497omaralvarez wants to merge 1 commit intocvg:masterfrom
omaralvarez wants to merge 1 commit intocvg:masterfrom
Conversation
Updated Python version to 3.10 and improved package installation.
Open
There was a problem hiding this comment.
Pull request overview
Updates the project Dockerfile to build successfully against the current colmap/colmap base image by moving to a newer Python version and adjusting a few Dockerfile best-practices.
Changes:
- Switch Python from 3.8 to 3.10 (via deadsnakes PPA) to restore
get-pip.pycompatibility and support newer components (e.g., LoMa work). - Replace deprecated
MAINTAINERwith aLABELand addgitto apt dependencies. - Use an absolute
WORKDIR(/app) and combineapt-get update+apt-get installto reduce layers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
8
| apt-get install -y git unzip wget software-properties-common | ||
| RUN add-apt-repository ppa:deadsnakes/ppa && \ | ||
| apt-get -y update && \ | ||
| apt-get install -y python${PYTHON_VERSION} |
There was a problem hiding this comment.
Consider adding --no-install-recommends and cleaning up apt metadata in the same RUN (e.g., removing /var/lib/apt/lists/* after install). Without this, the image retains apt cache data, increasing final image size and slowing pulls/builds.
Suggested change
| apt-get install -y git unzip wget software-properties-common | |
| RUN add-apt-repository ppa:deadsnakes/ppa && \ | |
| apt-get -y update && \ | |
| apt-get install -y python${PYTHON_VERSION} | |
| apt-get install -y --no-install-recommends git unzip wget software-properties-common && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN add-apt-repository ppa:deadsnakes/ppa && \ | |
| apt-get -y update && \ | |
| apt-get install -y --no-install-recommends python${PYTHON_VERSION} && \ | |
| rm -rf /var/lib/apt/lists/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tested the
Dockerfilerecently and it was not working with the current colmap image.apt updateandgetto save on layers.gitto the dependencies since it was mising.WORKDIRsince it is good practice.