Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM colmap/colmap:latest
MAINTAINER Paul-Edouard Sarlin
ARG PYTHON_VERSION=3.8
RUN apt-get update -y
RUN apt-get install -y unzip wget software-properties-common
LABEL maintainer="Paul-Edouard Sarlin"
ARG PYTHON_VERSION=3.10
RUN apt-get update -y && \
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}
Comment on lines +5 to 8
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

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/*

Copilot uses AI. Check for mistakes.
RUN wget https://bootstrap.pypa.io/get-pip.py && python${PYTHON_VERSION} get-pip.py
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1
COPY . /app
WORKDIR app/
WORKDIR /app
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
RUN pip3 install notebook
Loading