Skip to content

Commit e8947bf

Browse files
authored
Merge pull request #87 from alicevision/docker/updateCmake
[docker] update cmake and split docker in 2 parts
2 parents 9838498 + 806fd95 commit e8947bf

3 files changed

Lines changed: 53 additions & 23 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
- Support for cuda 9 and 10
2121
- Support for RTX architecture
2222
- Optional grid filtering
23+
- Dockerfile

Dockerfile

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
ARG CUDA_TAG=9.2-devel
2-
FROM nvidia/cuda:$CUDA_TAG
1+
ARG CUDA_TAG=10.2
2+
ARG OS_TAG=18.04
3+
FROM alicevision/popsift-deps:cuda${CUDA_TAG}-ubuntu${OS_TAG}
34
LABEL maintainer="AliceVision Team alicevision@googlegroups.com"
45

56
# use CUDA_TAG to select the image version to use
@@ -16,26 +17,9 @@ LABEL maintainer="AliceVision Team alicevision@googlegroups.com"
1617
# Cuda version (ENV): $CUDA_VERSION
1718

1819
# System update
19-
RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends\
20-
build-essential \
21-
cmake \
22-
git \
23-
wget \
24-
unzip \
25-
yasm \
26-
pkg-config \
27-
libtool \
28-
nasm \
29-
automake \
30-
libpng12-dev \
31-
libjpeg-turbo8-dev \
32-
libdevil-dev \
33-
libboost-filesystem-dev \
34-
libboost-system-dev \
35-
libboost-program-options-dev \
36-
libboost-thread-dev \
37-
&& rm -rf /var/lib/apt/lists/*
38-
3920
COPY . /opt/popsift
4021
WORKDIR /opt/popsift/build
41-
RUN cmake .. -DCMAKE_BUILD_TYPE=Release && make install -j
22+
RUN cmake .. -DCMAKE_BUILD_TYPE=Release && \
23+
make install -j $(nproc) && \
24+
cd /opt && \
25+
rm -rf popsift

Dockerfile_deps

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
ARG CUDA_TAG=10.2
2+
ARG OS_TAG=18.04
3+
FROM nvidia/cuda:${CUDA_TAG}-devel-ubuntu${OS_TAG}
4+
LABEL maintainer="AliceVision Team alicevision@googlegroups.com"
5+
6+
# use CUDA_TAG to select the image version to use
7+
# see https://hub.docker.com/r/nvidia/cuda/
8+
#
9+
# For example, to create a ubuntu 16.04 with cuda 8.0 for development, use
10+
# docker build --build-arg CUDA_TAG=8.0 --tag alicevision/popsift-deps:cuda${CUDA_TAG}-ubuntu${OS_TAG} .
11+
#
12+
# then execute with nvidia docker (https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0))
13+
# docker run -it --runtime=nvidia popsift_deps
14+
15+
16+
# OS/Version (FILE): cat /etc/issue.net
17+
# Cuda version (ENV): $CUDA_VERSION
18+
19+
# System update
20+
RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends\
21+
build-essential \
22+
wget \
23+
unzip \
24+
libtool \
25+
automake \
26+
libssl-dev \
27+
libjpeg-turbo8-dev \
28+
libdevil-dev \
29+
libboost-filesystem-dev \
30+
libboost-system-dev \
31+
libboost-program-options-dev \
32+
libboost-thread-dev \
33+
&& rm -rf /var/lib/apt/lists/*
34+
35+
# Manually install cmake
36+
WORKDIR /tmp/cmake
37+
ENV CMAKE_VERSION=3.17
38+
ENV CMAKE_VERSION_FULL=${CMAKE_VERSION}.2
39+
RUN wget https://cmake.org/files/v3.17/cmake-${CMAKE_VERSION_FULL}.tar.gz && \
40+
tar zxvf cmake-${CMAKE_VERSION_FULL}.tar.gz && \
41+
cd cmake-${CMAKE_VERSION_FULL} && \
42+
./bootstrap --prefix=/usr/local -- -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_USE_OPENSSL:BOOL=ON && \
43+
make -j$(nproc) install && \
44+
cd /tmp && \
45+
rm -rf cmake

0 commit comments

Comments
 (0)