-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (33 loc) · 1.22 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
FROM businessoptics/ubuntu:precise
MAINTAINER Jason Brownbridge <[email protected]>
RUN apt-get update
RUN apt-get -y install --no-install-recommends \
gfortran \
gcc \
make
RUN rm -Rf /var/lib/apt/lists/*
# hdf5
ADD hdf5_install.sh /tmp/hdf5_install.sh
RUN chmod 755 /tmp/hdf5_install.sh; /tmp/hdf5_install.sh
# blas
ADD blas.sh /tmp/blas.sh
RUN chmod 755 /tmp/blas.sh; /tmp/blas.sh
ENV BLAS /usr/local/lib/libfblas.a
# lapack
ADD lapack.sh /tmp/lapack.sh
RUN chmod 755 /tmp/lapack.sh; /tmp/lapack.sh
ENV LAPACK /usr/local/lib/liblapack.a
# Install heavy scientific libraries (order of installation matters)
RUN \
pip install -U numpy==1.6.2 && \
pip install -U scikit-learn==0.12 && \
pip install -U scipy==0.10.1 && \
pip install -U h5py==2.3.1
# Lazy install of required packages
ONBUILD RUN mkdir -p /usr/src/app
ONBUILD RUN apt-get update
ONBUILD COPY packages.txt /usr/src/app/packages.txt
ONBUILD COPY requirements.txt /usr/src/app/requirements.txt
ONBUILD RUN while read p; do echo "Installing $p" && apt-get -y install --no-install-recommends $p ; done < /usr/src/app/packages.txt
ONBUILD RUN while read r; do pip install -U $r ; done < /usr/src/app/requirements.txt
ONBUILD RUN rm -Rf /var/lib/apt/lists/*