-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
46 lines (39 loc) · 1.51 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM ubuntu:16.04
LABEL maintainer="leonardo.taccari@gmail.com"
# Install utils. libGL necessary for matplotlib.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
vim \
less \
bzip2 \
git \
libgl1-mesa-glx \
&& apt-get clean \
&& rm -rf /var/lib/apt-get/lists/* /tmp/* /var/tmp/*
# Install miniconda, iampl and other useful python modules
RUN cd /tmp && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& chmod +x Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda \
&& rm Miniconda3-latest-Linux-x86_64.sh \
&& /opt/miniconda/bin/conda install python=3.6 jupyter ipython matplotlib pandas -y \
&& /opt/miniconda/bin/conda clean --all -y \
&& /opt/miniconda/bin/pip install amplpy
# AMPL location (default: freely available demo version)
ARG AMPL=http://ampl.com/demo/ampl.linux64.tgz
# If $AMPL is a local compressed file, it will be automatically
# uncompressed into /opt by the ADD command.
# The script find_ampl.sh tries to ensure that /opt/ampl
# will point to a directory containing the ampl binaries.
ADD ${AMPL} /opt
COPY scripts /opt/scripts
RUN /opt/scripts/find_ampl.sh
# Add ampl and conda/python to the path
ENV PATH /opt/miniconda/bin:/opt/ampl:$PATH
ENV LANG C.UTF-8
# ipython/jupyter configurations
EXPOSE 8888
WORKDIR /root
CMD ["/opt/scripts/start_notebook.sh"]