forked from likr/emlapack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (33 loc) · 1000 Bytes
/
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
FROM apiaryio/emcc:latest
ENV EMLAPACK_DIR=/emlapack \
CLAPACK_VERSION=3.2.1
ENV EMLAPACK_DIST_DIR="${EMLAPACK_DIR}/dist"
WORKDIR "${EMLAPACK_DIR}"
RUN set -ex \
&& apt-get update -y \
&& apt-get install -y \
build-essential \
wget \
vim \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN wget "http://www.netlib.org/clapack/clapack-${CLAPACK_VERSION}.tgz" -O /tmp/clapack.tgz \
&& tar xvf /tmp/clapack.tgz \
&& mv "CLAPACK-${CLAPACK_VERSION}" clapack \
&& cp clapack/make.inc.example clapack/make.inc \
&& cd clapack/F2CLIBS/libf2c \
&& make all \
&& rm -rf /tmp/clapack.tgz \
&& cd "${EMLAPACK_DIR}" \
&& \
( \
grep -Fxq '#include "stdio.h"' clapack/BLAS/SRC/xerbla.c \
|| \
sed -i '1i #include "stdio.h"' clapack/BLAS/SRC/xerbla.c \
)
COPY package.json .
RUN npm install
COPY . .
RUN chmod +x scripts/custom_build.sh
VOLUME "${EMLAPACK_DIST_DIR}"
CMD "${EMLAPACK_DIR}/scripts/custom_build.sh"