Dockerfile.template 852 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
RUN apt-get update && apt-get install -y \
libblas-dev liblapack-dev liblapacke-dev gfortran \
 && rm -rf /var/lib/apt/lists/*

9
RUN pip install --no-cache-dir --upgrade numpy scipy scikit-learn
10

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
ONBUILD WORKDIR /senpy-plugins/


WORKDIR /usr/src/app
COPY test-requirements.txt requirements.txt /usr/src/app/
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
24
RUN pip install --no-cache-dir -r test-requirements.txt -r requirements.txt -r extra-requirements.txt
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
25
COPY . /usr/src/app/
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
26
RUN pip install --no-cache-dir --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"]