Skip to content

Commit 2f49e08

Browse files
committed
Specify python requirements explicitly on each Dockerfile.
Otherwise, we need a different requirement file for each docker configuration.
1 parent 4ffb5f7 commit 2f49e08

3 files changed

Lines changed: 61 additions & 9 deletions

File tree

Dockerfile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FROM ubuntu:20.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

5-
# Install apt-getable dependencies
65
RUN apt-get update \
76
&& apt-get install -y \
87
build-essential \
@@ -22,10 +21,28 @@ RUN apt-get update \
2221
&& apt-get clean \
2322
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2423

24+
RUN pip3 install \
25+
cloudpickle==0.4.0 \
26+
exifread==2.1.2 \
27+
flask==2.3.2 \
28+
fpdf2==2.4.6 \
29+
joblib==0.14.1 \
30+
matplotlib \
31+
networkx==2.5 \
32+
numpy>=1.19 \
33+
Pillow>=8.1.1 \
34+
pyproj>=1.9.5.1 \
35+
pytest==3.0.7 \
36+
python-dateutil>=2.7 \
37+
pyyaml>=5.4 \
38+
scipy>=1.10.0 \
39+
Sphinx==4.2.0 \
40+
xmltodict==0.10.2 \
41+
wheel \
42+
opencv-python
2543

2644
COPY . /source/OpenSfM
2745

2846
WORKDIR /source/OpenSfM
2947

30-
RUN pip3 install -r requirements.txt && \
31-
python3 setup.py build
48+
RUN python3 setup.py build

Dockerfile.ceres2

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FROM ubuntu:20.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

5-
# Install apt-getable dependencies
65
RUN apt-get update \
76
&& apt-get install -y \
87
build-essential \
@@ -24,6 +23,27 @@ RUN apt-get update \
2423
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2524

2625

26+
RUN pip3 install \
27+
cloudpickle==0.4.0 \
28+
exifread==2.1.2 \
29+
flask==2.3.2 \
30+
fpdf2==2.4.6 \
31+
joblib==0.14.1 \
32+
matplotlib \
33+
networkx==2.5 \
34+
numpy>=1.19 \
35+
Pillow>=8.1.1 \
36+
pyproj>=1.9.5.1 \
37+
pytest==3.0.7 \
38+
python-dateutil>=2.7 \
39+
pyyaml>=5.4 \
40+
scipy>=1.10.0 \
41+
Sphinx==4.2.0 \
42+
xmltodict==0.10.2 \
43+
wheel \
44+
opencv-python
45+
46+
2747
# Install Ceres 2
2848
RUN \
2949
mkdir -p /source && cd /source && \
@@ -39,5 +59,4 @@ COPY . /source/OpenSfM
3959

4060
WORKDIR /source/OpenSfM
4161

42-
RUN pip3 install -r requirements.txt && \
43-
python3 setup.py build
62+
RUN python3 setup.py build

Dockerfile.ubuntu22

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FROM ubuntu:22.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

5-
# Install apt-getable dependencies
65
RUN apt-get update \
76
&& apt-get install -y \
87
build-essential \
@@ -22,10 +21,27 @@ RUN apt-get update \
2221
&& apt-get clean \
2322
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2423

24+
RUN pip3 install \
25+
cloudpickle==3.1.1 \
26+
ExifRead==3.3.1 \
27+
Flask==3.1.1 \
28+
fpdf2==2.8.3 \
29+
joblib==1.5.1 \
30+
matplotlib==3.5.1 \
31+
networkx==3.4.2 \
32+
numpy==1.21.5 \
33+
opencv-python==4.11.0.86 \
34+
Pillow==9.0.1 \
35+
pyproj==3.3.0 \
36+
pytest==8.4.0 \
37+
python-dateutil==2.8.1 \
38+
PyYAML==5.4.1 \
39+
scipy==1.8.0 \
40+
Sphinx==4.2.0 \
41+
xmltodict==0.14.2
2542

2643
COPY . /source/OpenSfM
2744

2845
WORKDIR /source/OpenSfM
2946

30-
RUN pip3 install -r requirements.txt && \
31-
python3 setup.py build
47+
RUN python3 setup.py build

0 commit comments

Comments
 (0)