forked from Kai-46/texture_mapping
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
48 lines (37 loc) · 1.71 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# this Dockerfile can be used to compile any third party softwares
# if the source code is stored locally, first copy this Dockerfile into the source code directory
# if the source code is stored in the github, we simply need this Dockerfile
# specify base os
FROM ubuntu:18.04
LABEL maintainer="Kai Zhang"
# specify that the following instructions will be run in a non-interactive way
ARG DEBIAN_FRONTEND=non-interactive
# install all package dependencies
# RUN apt-get update && apt-get install -y git build-essential cmake
RUN apt-get update && apt-get install -y python3 python3-pip python3-numpy python3-scipy
# create symbolic links so that python3 becomes the default python
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN ln -s /usr/bin/pip3 /usr/bin/pip
# package for dealing with .ply files
RUN pip install plyfile
# install GDAL
RUN apt-get update && apt-get install -y gdal-bin python3-gdal
# the docker image filesystem has exactly the same structure as that of a linux system
# pull the source code from the github
# RUN git clone <github repo address>
# copy all the files inside the current host directory into that working directory
# what will be copied can be controlled by a .Dockerignore
# compile the source code inside the working directory
COPY . /texture_mapping
# build the software
# RUN cd /<source code folder name> && make -j4 all
# or cmake
# RUN cd /<source code folder name> && mkdir build && cd build && cmake .. && make -j4
# specify a working directory inside the docker image filesystem
WORKDIR /texture_mapping
# give full access to non-root users
RUN chmod -R 777 /texture_mapping
# provide an entry point
# ENTRYPOINT["/<source code folder name>/entry_point.sh"]
# or execute some command
# CMD["bash"]