Skip to content

Commit 54e20dc

Browse files
daniel-j-hjqtrde
authored andcommitted
Updates dependency management in docker images
1 parent 20850ed commit 54e20dc

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

deps/requirements-lock.txt

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ Click==7.0
77
click-plugins==1.1.1
88
cligj==0.5.0
99
cycler==0.10.0
10-
Flask==1.0.2
10+
Flask==1.0.3
1111
geojson==2.4.1
1212
idna==2.8
13+
importlib-metadata==0.15
1314
itsdangerous==1.1.0
1415
Jinja2==2.10.1
1516
kiwisolver==1.1.0
1617
MarkupSafe==1.1.1
17-
matplotlib==3.0.3
18+
matplotlib==3.1.0
1819
mercantile==1.0.4
1920
more-itertools==7.0.0
20-
numpy==1.16.3
21+
numpy==1.16.4
2122
opencv-contrib-python==4.1.0.25
2223
osmium==2.15.2
2324
Pillow==6.0.0
24-
pluggy==0.11.0
25+
pluggy==0.12.0
2526
py==1.8.0
2627
pyparsing==2.4.0
2728
pyproj==2.1.3
@@ -30,15 +31,16 @@ python-dateutil==2.8.0
3031
rasterio==1.0.23
3132
requests==2.22.0
3233
Rtree==0.8.3
33-
scipy==1.2.1
34+
scipy==1.3.0
3435
Shapely==1.6.4.post2
3536
six==1.12.0
3637
snuggs==1.4.6
3738
supermercado==0.0.5
3839
toml==0.10.0
3940
torch==1.1.0
40-
torchvision==0.2.2.post3
41+
torchvision==0.3.0
4142
tqdm==4.32.1
42-
urllib3==1.25.2
43+
urllib3==1.25.3
4344
wcwidth==0.1.7
4445
Werkzeug==0.15.4
46+
zipp==0.5.1

deps/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
torch
12
torchvision
23
numpy
34
pillow

docker/Dockerfile.cpu

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
FROM ubuntu:18.04
22

3-
ARG TCH=1.1.0
4-
ARG PY=36
5-
63
WORKDIR /usr/src/app
74

8-
RUN apt-get update -qq && \
9-
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y -o quiet=1 \
10-
python3 python3-dev python3-tk python3-pip libspatialindex-c4v5 libsm6
5+
ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" PATH="/opt/venv/bin:$PATH"
6+
7+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
8+
python3 python3-pip python3-venv libspatialindex-c4v5 libsm6 libxrender1 libxext6 && \
9+
python3 -m venv /opt/venv && \
10+
python3 -m pip install pip==19.1.1 && \
11+
rm -rf /var/lib/apt/lists/*
1112

12-
RUN python3 -m pip install http://download.pytorch.org/whl/cpu/torch-${TCH}-cp${PY}-cp${PY}m-linux_x86_64.whl
13+
RUN python3 -m pip install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl && \
14+
python3 -m pip install https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl
1315

1416
COPY deps/requirements-lock.txt deps/requirements-lock.txt
1517
RUN python3 -m pip install -r deps/requirements-lock.txt
@@ -18,8 +20,5 @@ RUN python3 -c "from torchvision.models import resnet50; resnet50(True)"
1820

1921
COPY . .
2022

21-
ENV LANG C.UTF-8
22-
ENV LC_ALL C.UTF-8
23-
2423
ENTRYPOINT ["/usr/src/app/rs"]
2524
CMD ["-h"]

docker/Dockerfile.gpu

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
FROM nvidia/cuda:10.1-cudnn7-runtime
22

3-
ARG TCH=1.1.0
4-
ARG PY=36
5-
ARG CU=100
6-
73
WORKDIR /usr/src/app
84

9-
RUN apt-get update -qq && \
10-
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y -o quiet=1 \
11-
python3 python3-dev python3-tk python3-pip libspatialindex-c4v5 libsm6
5+
ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" PATH="/opt/venv/bin:$PATH"
6+
7+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
8+
python3 python3-pip python3-venv libspatialindex-c4v5 libsm6 libxrender1 libxext6 && \
9+
python3 -m venv /opt/venv && \
10+
python3 -m pip install pip==19.1.1 && \
11+
rm -rf /var/lib/apt/lists/*
1212

13-
RUN python3 -m pip install http://download.pytorch.org/whl/cu${CU}/torch-${TCH}-cp${PY}-cp${PY}m-linux_x86_64.whl
13+
RUN python3 -m pip install https://download.pytorch.org/whl/cu100/torch-1.1.0-cp36-cp36m-linux_x86_64.whl && \
14+
python3 -m pip install https://download.pytorch.org/whl/cu100/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl
1415

1516
COPY deps/requirements-lock.txt deps/requirements-lock.txt
1617
RUN python3 -m pip install -r deps/requirements-lock.txt
@@ -19,8 +20,5 @@ RUN python3 -c "from torchvision.models import resnet50; resnet50(True)"
1920

2021
COPY . .
2122

22-
ENV LANG C.UTF-8
23-
ENV LC_ALL C.UTF-8
24-
2523
ENTRYPOINT ["/usr/src/app/rs"]
2624
CMD ["-h"]

0 commit comments

Comments
 (0)