-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
31 lines (26 loc) · 1.2 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
# Decloud dockerfile
# To build the docker image for cpu, do the following:
#
# docker build --build-arg "BASE_IMAGE=mdl4eo/otbtf:4.3.1-cpu-dev" .
#
ARG BASE_IMAGE=mdl4eo/otbtf:4.3.1-gpu-dev
FROM $BASE_IMAGE
LABEL description="Decloud docker image"
LABEL maintainer="Remi Cresson [at] inrae [dot] fr"
USER root
# APT Packages
COPY docker/apt_packages.txt /tmp/apt_packages.txt
RUN apt update && sed 's/#.*//' /tmp/apt_packages.txt | xargs apt-get install -y && apt clean
RUN apt upgrade -y
# Pip packages
COPY docker/requirements.txt /tmp/requirements.txt
RUN python3 -m pip install -r /tmp/requirements.txt
# Build remote modules
RUN cd /src/otb/otb/Modules/Remote/ && git clone https://forgemia.inra.fr/orfeo-toolbox/otb-simpleextractiontools.git
RUN cd /src/otb/otb/Modules/Remote/ && git clone https://forgemia.inra.fr/orfeo-toolbox/otb-mlutils.git
COPY . /src/otb/otb/Modules/Remote/decloud/
RUN cd /src/otb/build/OTB/build && cmake /src/otb/otb/ -DModule_SimpleExtractionTools=ON -DModule_MLUtils=ON -DBUILD_TESTING=OFF -DModule_OTBDecloud=ON
RUN cd /src/otb/build/OTB/build && make -j $(nproc --all) install
# Install decloud
RUN cd /src/otb/otb/Modules/Remote/decloud/ && python3 -m pip install .
USER otbuser