-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (30 loc) · 1.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# syntax=docker/dockerfile:experimental
FROM colmap/colmap:latest
WORKDIR /app
# Update GPG Key for Nvidia manually
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub
# Install dependencies and Python 3.10
RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y \
libssl-dev \
software-properties-common \
curl \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update -y \
&& apt-get install -y \
python3.10 \
python3-pip
# Install pip for Python 3.10
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN --mount=type=cache,target=/root/.cache/pip \
python3.10 -m pip install --upgrade -r requirements.txt
# Copy the rest of the application
COPY . .
# Command to run the application
CMD ["python3.10", "main.py", "--config=configs/default.txt"]