Dockerfile for OSDF Minizinc Placement Examples
[optf/osdf.git] / examples / placement-models-minizinc / Dockerfile
1 FROM ubuntu:16.04
2
3 ENV MZN 2.1.6
4 ENV MZN_BASENAME MiniZincIDE-${MZN}-bundle-linux-x86_64
5 ENV MZN_GH_BASE https://github.com/MiniZinc/MiniZincIDE
6 ENV MZN_DL_URL ${MZN_GH_BASE}/releases/download/${MZN}/${MZN_BASENAME}.tgz
7
8 RUN apt-get update -y \
9     && apt-get install -y vim wget libmpfr-dev \
10     && apt-get install -y git libqt5printsupport5 build-essential \
11     && apt-get install -y python3 python3-setuptools python3-dev \
12     && easy_install3 pip \
13     && pip install --upgrade virtualenv pip wheel \
14     && pip install jupyterlab
15
16 # Minizinc
17 RUN wget -q $MZN_DL_URL -O mz.tgz \
18     && tar xzf mz.tgz \
19     && mv $MZN_BASENAME /mz-dist \
20     && rm mz.tgz \
21     && echo PATH=/mz-dist:$PATH >> ~/.bashrc
22
23 ENV SHELL /bin/bash
24 ENV PATH /mz-dist:$PATH
25
26 # OSDF
27 RUN git clone http://gerrit.onap.org/r/optf/osdf \
28     && pip install --no-cache-dir -r osdf/requirements.txt
29
30 # TODO: Have a clean build process for OSDF beyond the simple cloning
31
32 # To add: git clone the OSDF repository
33 # pip install --no-cache-dir -r requirements.txt
34 # Run some tests at this point itself (so we know if something breaks badly)