-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity.geopatch
45 lines (36 loc) · 1.13 KB
/
Singularity.geopatch
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Bootstrap: docker
From: tensorflow/tensorflow:1.15.5-py3
%files
. /src
%post
# Install necessary dependencies
apt-get update && apt-get install -y \
cmake \
pkg-config \
wget \
unzip && \
rm -rf /var/lib/apt/lists/*
# Set working directory
cd /src
# Install OpenCV 3.4.8
wget "https://github.com/opencv/opencv/archive/3.4.8.zip" && \
unzip 3.4.8.zip && \
mkdir -p opencv-3.4.8/build && \
cd opencv-3.4.8/build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_LIST=core,highgui,imgproc,features2d .. && \
make -j$(nproc) && \
make install
# Download and extract SimulationICCV.tar.gz
cd /src
wget "https://www.verlab.dcc.ufmg.br/nonrigid/SimulationICCV.tar.gz" && \
tar -xvf SimulationICCV.tar.gz
# Install Python dependencies
pip3 install opencv-python-headless==3.4.3.18 scipy --prefer-binary
# Build geopatch
cd /src/geopatch
mkdir -p build && cd build
cmake .. && make -j$(nproc)
# Clean up temporary files
rm -rf /src/opencv-3.4.8 /src/3.4.8.zip /src/SimulationICCV.tar.gz
chmod -R 777 /src