-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
37 lines (33 loc) · 1.07 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
FROM ubuntu:20.04 as buildexamples
RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /home/gurobi \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /home/gurobi
RUN git init \
&& git remote add origin https://github.com/Gurobi/modeling-examples.git \
&& git fetch \
&& git checkout -t origin/master -f \
&& rm -rf .git
FROM python:3.10-slim-bullseye
ARG GRB_VERSION=10.0.2
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN python -m pip install \
notebook \
matplotlib \
numpy \
pandas \
scikit-learn \
folium \
xlrd==1.2.0 \
&& python -m pip install gurobipy==${GRB_VERSION} \
&& mkdir -p /home/gurobi
WORKDIR /home/gurobi
COPY --from=buildexamples /home/gurobi .
ENTRYPOINT ["jupyter", "notebook", "--no-browser", "--allow-root", "--ip=0.0.0.0", "--port=8888" ]
CMD ["--notebook-dir=/home/gurobi", "--NotebookApp.token=''","--NotebookApp.password=''"]
EXPOSE "8888"