Skip to content

Commit

Permalink
Updates dependency management in docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-j-h authored and jqtrde committed May 28, 2019
1 parent 20850ed commit 54e20dc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
16 changes: 9 additions & 7 deletions deps/requirements-lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@ Click==7.0
click-plugins==1.1.1
cligj==0.5.0
cycler==0.10.0
Flask==1.0.2
Flask==1.0.3
geojson==2.4.1
idna==2.8
importlib-metadata==0.15
itsdangerous==1.1.0
Jinja2==2.10.1
kiwisolver==1.1.0
MarkupSafe==1.1.1
matplotlib==3.0.3
matplotlib==3.1.0
mercantile==1.0.4
more-itertools==7.0.0
numpy==1.16.3
numpy==1.16.4
opencv-contrib-python==4.1.0.25
osmium==2.15.2
Pillow==6.0.0
pluggy==0.11.0
pluggy==0.12.0
py==1.8.0
pyparsing==2.4.0
pyproj==2.1.3
Expand All @@ -30,15 +31,16 @@ python-dateutil==2.8.0
rasterio==1.0.23
requests==2.22.0
Rtree==0.8.3
scipy==1.2.1
scipy==1.3.0
Shapely==1.6.4.post2
six==1.12.0
snuggs==1.4.6
supermercado==0.0.5
toml==0.10.0
torch==1.1.0
torchvision==0.2.2.post3
torchvision==0.3.0
tqdm==4.32.1
urllib3==1.25.2
urllib3==1.25.3
wcwidth==0.1.7
Werkzeug==0.15.4
zipp==0.5.1
1 change: 1 addition & 0 deletions deps/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
torch
torchvision
numpy
pillow
Expand Down
19 changes: 9 additions & 10 deletions docker/Dockerfile.cpu
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
FROM ubuntu:18.04

ARG TCH=1.1.0
ARG PY=36

WORKDIR /usr/src/app

RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y -o quiet=1 \
python3 python3-dev python3-tk python3-pip libspatialindex-c4v5 libsm6
ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" PATH="/opt/venv/bin:$PATH"

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 python3-pip python3-venv libspatialindex-c4v5 libsm6 libxrender1 libxext6 && \
python3 -m venv /opt/venv && \
python3 -m pip install pip==19.1.1 && \
rm -rf /var/lib/apt/lists/*

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

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

COPY . .

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

ENTRYPOINT ["/usr/src/app/rs"]
CMD ["-h"]
20 changes: 9 additions & 11 deletions docker/Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM nvidia/cuda:10.1-cudnn7-runtime

ARG TCH=1.1.0
ARG PY=36
ARG CU=100

WORKDIR /usr/src/app

RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y -o quiet=1 \
python3 python3-dev python3-tk python3-pip libspatialindex-c4v5 libsm6
ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" PATH="/opt/venv/bin:$PATH"

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 python3-pip python3-venv libspatialindex-c4v5 libsm6 libxrender1 libxext6 && \
python3 -m venv /opt/venv && \
python3 -m pip install pip==19.1.1 && \
rm -rf /var/lib/apt/lists/*

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

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

COPY . .

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

ENTRYPOINT ["/usr/src/app/rs"]
CMD ["-h"]

0 comments on commit 54e20dc

Please sign in to comment.