-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (19 loc) · 956 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
# Docker image to build directory for bn.
# Usage:
#
# docker build --tag=pipper . && \
# docker run --build-arg build_dir=$PWD -v /tmp/data/:/data/
FROM ubuntu:16.04 as base
ARG py_version
# SciPy installer needs dependencies, and also NumPy already
# installed. Cheat and install it first.
RUN apt-get update && apt-get install -y python${py_version}-dev python${py_version}-pip curl && apt-get build-dep -y python${py_version}-scipy
# Directory to copy in for build. After building, cp this out -- to
# the same place. Otherwise pip will have to rebuild everything,
# every time.
RUN pip${py_version} install virtualenv
COPY oldrequirements.txt /tmp/oldrequirements.txt
RUN virtualenv /tmp/tmpenv && /tmp/tmpenv/bin/pip${py_version} install -r /tmp/oldrequirements.txt --src $HOME && rm -r /tmp/tmpenv
COPY requirements.txt /tmp/requirements.txt
RUN mkdir -p /tmp/dist
RUN pip${py_version} install -t /tmp/dist -r /tmp/requirements.txt