Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
xerus
xerus
Commits
efe3b5d0
Commit
efe3b5d0
authored
Aug 12, 2019
by
Philipp Trunschke
Browse files
update Dockerfiles and Makefiles
parent
7ed0512a
Pipeline
#1584
failed with stages
in 22 minutes and 47 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
efe3b5d0
...
...
@@ -268,18 +268,22 @@ install: shared
test
-d
$(
strip
$(INSTALL_LIB_PATH)
)
;
test
-d
$(
strip
$(INSTALL_HEADER_PATH)
)
;
@
printf
"Installing libxerus.so to
$(
strip
$(INSTALL_LIB_PATH)
)
and storing the header files in
$(
strip
$(INSTALL_HEADER_PATH)
)
.
\n
"
ifdef
INSTALL_PYTHON2_PATH
test
-d
$(
strip
$(INSTALL_PYTHON2_PATH)
)
;
@
printf
"Installing python2/xerus.so to
$(
strip
$(INSTALL_PYTHON2_PATH)
)
.
\n
"
endif
ifdef
INSTALL_PYTHON3_PATH
test
-d
$(
strip
$(INSTALL_PYTHON3_PATH)
)
;
@
printf
"Installing python3/xerus.so to
$(
strip
$(INSTALL_PYTHON3_PATH)
)
.
\n
"
endif
cp
include/xerus.h
$(INSTALL_HEADER_PATH)
cp
-r
include/xerus
$(INSTALL_HEADER_PATH)
cp
build/libxerus_misc.so
$(INSTALL_LIB_PATH)
cp
build/libxerus.so
$(INSTALL_LIB_PATH)
ifdef
INSTALL_PYTHON2_PATH
test
-d
$(
strip
$(INSTALL_PYTHON2_PATH)
)
;
@
printf
"Installing xerus.so to
$(
strip
$(INSTALL_PYTHON2_PATH)
)
.
\n
"
cp
build/python2/xerus.so
$(INSTALL_PYTHON2_PATH)
endif
ifdef
INSTALL_PYTHON3_PATH
test
-d
$(
strip
$(INSTALL_PYTHON3_PATH)
)
;
@
printf
"Installing xerus.so to
$(
strip
$(INSTALL_PYTHON3_PATH)
)
.
\n
"
cp
build/python3/xerus.so
$(INSTALL_PYTHON3_PATH)
endif
else
...
...
config.mk.default
View file @
efe3b5d0
...
...
@@ -140,9 +140,5 @@ BOOST_LIBS = -lboost_filesystem -lboost_system
# ARPACK_LIBRARIES = -larpack
# OTHER += -DARPACK_LIBRARIES
# Uncomment or add the appropriate boost python library
BOOST_PYTHON2 = -lboost_python-py27
BOOST_PYTHON3 = -lboost_python-py35
# Custom include paths
# OTHER += -I /path/to/include
docker/base/Dockerfile
View file @
efe3b5d0
FROM
phusion/baseimage:0.
9.22
FROM
phusion/baseimage:0.
11
USER
root
WORKDIR
"/tmp/"
# Get Ubuntu updates
RUN
apt-get
-qq
update
&&
\
apt-get
-y
--with-new-pkgs
-o
Dpkg::Options::
=
"--force-confold"
upgrade
RUN
apt-get update
&&
\
apt-get
upgrade
-y
-o
Dpkg::Options::
=
"--force-confold"
# Set locale environment
RUN
apt-get
-y
install
locales
sudo
&&
\
...
...
@@ -14,10 +14,6 @@ ENV LC_ALL=C.UTF-8 \
LANG=C.UTF-8 \
LANGUAGE=C.UTF-8
# Turn off forwarding of syslog messages to stdout
# https://github.com/phusion/baseimage-docker/issues/186
RUN
touch
/etc/service/syslog-forwarder/down
# Non-Python utilities and libraries
RUN
apt-get
-y
install
\
cmake
\
...
...
@@ -32,7 +28,12 @@ RUN apt-get -y install \
libopenblas-dev
\
libiberty-dev
\
binutils-dev
\
zlib1g-dev
zlib1g-dev
\
libdpkg-perl
# Check Python versions
RUN
python
-c
'from __future__ import print_function; import sys; version = "{0}.{1}".format(*sys.version_info); print("python2-version:", version)'
RUN
python3
-c
'import sys; version = "{0}.{1}".format(*sys.version_info); print("python3-version:", version)'
# Install Python2 based environment
RUN
apt-get
-y
install
\
...
...
docker/build.sh
View file @
efe3b5d0
#!/bin/bash
DIRNAME
=
$(
dirname
$0
)
docker build
"
$@
"
-t
firemarmot/base
$DIRNAME
/base
docker build
"
$@
"
-t
firemarmot/suitesparse
$DIRNAME
/suitesparse
docker build
"
$@
"
-t
firemarmot/xerus
$DIRNAME
/xerus
docker build
"
$@
"
-t
firemarmot/base
$DIRNAME
/base
&&
\
docker build
"
$@
"
-t
firemarmot/suitesparse
$DIRNAME
/suitesparse
&&
\
docker build
"
$@
"
-t
firemarmot/xerus
$DIRNAME
/xerus
&&
\
# docker build "$@" -t firemarmot/interactive $DIRNAME/interactive
docker build
"
$@
"
-t
firemarmot/interactive_fenics
$DIRNAME
/interactive_fenics
docker/xerus/Dockerfile
View file @
efe3b5d0
...
...
@@ -3,22 +3,26 @@ USER root
WORKDIR
"/tmp/"
# Check Python versions
RUN
python
-c
'import sys; version = "{0}.{1}".format(*sys.version_info); print("python2-version:", version); raise SystemExit(version != "2.7")'
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")'
RUN
python3
-c
'import sys; version = "{0}.{1}".format(*sys.version_info); print("python3-version:", version); raise SystemExit(version != "3.6")'
# Install Xerus
RUN
git clone https://git.hemio.de/xerus/xerus.git
WORKDIR
"/tmp/xerus/"
RUN
git checkout pybind11
&&
\
cp
./docker/xerus/config.mk
.
&&
\
git pull
&&
\
git submodule update
--init
--recursive
RUN
cp
./docker/xerus/config.mk
.
&&
\
mkdir
-p
/usr/local/lib
&&
\
mkdir
-p
/usr/local/include
&&
\
mkdir
-p
/usr/local/lib/python2.7/site-packages
&&
\
mkdir
-p
/usr/local/lib/python3.6/site-packages
&&
\
make python2 python3
-j
$(
cat
/tmp/NCORES_1
)
RUN
ls
/usr/local/lib/python3.6/
&&
\
make
install
-j
$(
cat
/tmp/NCORES_1
)
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
)
&&
\
echo
/usr/local/lib/python3.
5
/site-packages/
>
$(
python3
-m
site
--user-site
)
/xerus.pth
echo
/usr/local/lib/python3.
6
/site-packages/
>
$(
python3
-m
site
--user-site
)
/xerus.pth
ENV
LD_LIBRARY_PATH "/usr/local/lib/:$LD_LIBRARY_PATH"
docker/xerus/config.mk
View file @
efe3b5d0
...
...
@@ -15,7 +15,7 @@ LOGGING += -D XERUS_LOG_ABSOLUTE_TIME # Print absolute times instead of rela
INSTALL_LIB_PATH
=
/usr/local/lib
# Path where to install the libxerus.so shared library.
INSTALL_HEADER_PATH
=
/usr/local/include
# Path where to install the xerus header files.
INSTALL_PYTHON2_PATH
=
/usr/local/lib/python2.7/site-packages
INSTALL_PYTHON3_PATH
=
/usr/local/lib/python3.
5
/site-packages
INSTALL_PYTHON3_PATH
=
/usr/local/lib/python3.
6
/site-packages
BLAS_LIBRARIES
=
-lopenblas
-lgfortran
# Openblas, serial
LAPACK_LIBRARIES
=
-llapacke
-llapack
# Standard Lapack + Lapacke libraries
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment