Dockerfile 1.22 KB
Newer Older
Philipp  Trunschke's avatar
Philipp Trunschke committed
1
2
3
4
FROM firemarmot/suitesparse
USER root
WORKDIR "/tmp/"

Philipp  Trunschke's avatar
Philipp Trunschke committed
5
# Check Python versions
6
RUN python  -c'from __future__ import print_function; import sys; version = "{0}.{1}".format(*sys.version_info); print("python2-version:", version); raise SystemExit(version != "2.7")'
Philipp  Trunschke's avatar
Philipp Trunschke committed
7
RUN python3 -c'import sys; version = "{0}.{1}".format(*sys.version_info); print("python3-version:", version); raise SystemExit(version != "3.6")'
Philipp  Trunschke's avatar
Philipp Trunschke committed
8

Philipp  Trunschke's avatar
Philipp Trunschke committed
9
10
11
# Install Xerus
RUN git clone https://git.hemio.de/xerus/xerus.git
WORKDIR "/tmp/xerus/"
Philipp  Trunschke's avatar
Philipp Trunschke committed
12
RUN git checkout pybind11 && \
13
14
15
	git pull && \
	git submodule update --init --recursive
RUN cp ./docker/xerus/config.mk . && \
Philipp  Trunschke's avatar
Philipp Trunschke committed
16
17
18
	mkdir -p /usr/local/lib && \
	mkdir -p /usr/local/include && \
	mkdir -p /usr/local/lib/python2.7/site-packages && \
Philipp  Trunschke's avatar
Philipp Trunschke committed
19
	mkdir -p /usr/local/lib/python3.6/site-packages && \
20
21
	make python2 python3 -j $(cat /tmp/NCORES_1)
RUN ls /usr/local/lib/python3.6/ && \
Philipp  Trunschke's avatar
Philipp Trunschke committed
22
23
	make install -j $(cat /tmp/NCORES_1)

Philipp  Trunschke's avatar
Philipp Trunschke committed
24
25
26
RUN mkdir -p $(python -m site --user-site) && \
	echo /usr/local/lib/python2.7/site-packages/ >$(python -m site --user-site)/xerus.pth && \
	mkdir -p $(python3 -m site --user-site) && \
27
	echo /usr/local/lib/python3.6/site-packages/ >$(python3 -m site --user-site)/xerus.pth
Philipp  Trunschke's avatar
Philipp Trunschke committed
28
ENV LD_LIBRARY_PATH "/usr/local/lib/:$LD_LIBRARY_PATH"