forked from lightmetrica/lightmetrica-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (56 loc) · 1.57 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM ubuntu:latest
MAINTAINER Hisanari Otsu <[email protected]>
# -----------------------------------------------------------------------------
# System packages
RUN apt update && apt install -y \
tmux \
vim \
curl \
git \
git-lfs \
software-properties-common \
build-essential \
doxygen \
graphviz
# -----------------------------------------------------------------------------
# Install miniconda & dependencies
WORKDIR /
RUN curl -OJLs https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
RUN bash Miniconda3-latest-Linux-x86_64.sh -p /miniconda -b
ENV PATH=${PATH}:/miniconda/bin
RUN conda update -y conda && conda install -y -c conda-forge -c hi2p-perim \
python=3.7 \
cmake \
ninja \
jupyter \
matplotlib \
pandas \
sphinx \
sphinx_rtd_theme \
jupytext \
tqdm \
imageio \
pytest \
zeromq \
cppzmq \
pybind11 \
embree3 \
glm \
nlohmann_json \
doctest-cpp \
fmt \
stb \
cereal
RUN pip install breathe sphinx_tabs nbsphinx
RUN imageio_download_bin freeimage
# -----------------------------------------------------------------------------
# Build and install Lighmetrica
COPY . /lightmetrica-v3
WORKDIR /lightmetrica-v3
RUN cmake -G "Ninja" -H. -B_build -DCMAKE_BUILD_TYPE=Release -DLM_BUILD_GUI_EXAMPLES=OFF && \
cmake --build _build --target install -- -j 4
# Run tests
WORKDIR /lightmetrica-v3/_build/bin
RUN LD_LIBRARY_PATH=. ./lm_test
WORKDIR /lightmetrica-v3
RUN LD_LIBRARY_PATH=./_build/bin PYTHONPATH=./_build/bin python -m pytest ./pytest