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

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 mkdir /cache/ /senpy-plugins /data/
10 11 12

VOLUME /data/

13
ENV PIP_CACHE_DIR=/cache/ SENPY_DATA=/data
14

15
ONBUILD COPY . /senpy-plugins/
16
ONBUILD RUN python -m senpy --only-install -f /senpy-plugins
17 18 19 20
ONBUILD WORKDIR /senpy-plugins/


WORKDIR /usr/src/app
21
COPY test-requirements.txt requirements.txt extra-requirements.txt /usr/src/app/
22
RUN pip install --no-cache-dir -r test-requirements.txt -r requirements.txt -r extra-requirements.txt
23
COPY . /usr/src/app/
24
RUN pip install --no-cache-dir --no-index --no-deps --editable .
25

26
ENTRYPOINT ["python", "-m", "senpy", "-f", "/senpy-plugins/", "--host", "0.0.0.0"]