Dockerfile.template 793 Bytes
Newer Older
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
1
from python:{{PYVERSION}}
2

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
3
MAINTAINER J. Fernando Sánchez <jf.sanchez@upm.es>
4

5
6
7
8
9
10
RUN apt-get update && apt-get install -y \
libblas-dev liblapack-dev liblapacke-dev gfortran \
 && rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade numpy scipy scikit-learn

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
11
RUN mkdir /cache/ /senpy-plugins /data/
12
13
14

VOLUME /data/

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
15
ENV PIP_CACHE_DIR=/cache/ SENPY_DATA=/data
16

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
17
ONBUILD COPY . /senpy-plugins/
18
ONBUILD RUN python -m senpy --only-install -f /senpy-plugins
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
19
20
21
22
23
24
25
ONBUILD WORKDIR /senpy-plugins/


WORKDIR /usr/src/app
COPY test-requirements.txt requirements.txt /usr/src/app/
RUN pip install --use-wheel -r test-requirements.txt -r requirements.txt
COPY . /usr/src/app/
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
26
RUN pip install --no-index --no-deps --editable .
27

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
28
ENTRYPOINT ["python", "-m", "senpy", "-f", "/senpy-plugins/", "--host", "0.0.0.0"]