-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
58 lines (48 loc) · 1.88 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
47
48
49
50
51
52
53
54
55
56
57
#
# Docker file to create a Compute Server Node Manager
#
FROM ubuntu:20.04 as buildmanager
ARG GRB_VERSION=10.0.3
ARG GRB_SHORT_VERSION=10.0
# install manager package and copy the files
WORKDIR /opt
RUN apt-get update \
&& apt-get install --no-install-recommends -y\
ca-certificates \
wget \
&& update-ca-certificates \
&& wget -v https://packages.gurobi.com/${GRB_SHORT_VERSION}/gurobi_server${GRB_VERSION}_linux64.tar.gz \
&& tar -xvf gurobi_server${GRB_VERSION}_linux64.tar.gz \
&& rm -f gurobi_server${GRB_VERSION}_linux64.tar.gz \
&& mv -f gurobi_server* gurobi_server \
&& rm -rf gurobi/linux64/docs
# After the file renaming, a clean image is built
FROM ubuntu:20.04 AS packagemanager
ARG GRB_VERSION=10.0.3
LABEL vendor="Gurobi"
LABEL version=${GRB_VERSION}
# update system and certificates
RUN apt-get update \
&& apt-get install --no-install-recommends -y\
ca-certificates \
p7zip-full \
zip \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/gurobi_server
COPY --from=buildmanager /opt/gurobi_server/linux64/bin/grb_rsm ./linux64/bin/grb_rsm
COPY --from=buildmanager /opt/gurobi_server/linux64/bin/grbcluster ./linux64/bin/grbcluster
COPY --from=buildmanager /opt/gurobi_server/linux64/bin/grb_rsm.cnf ./linux64/bin/grb_rsm.cnf
COPY --from=buildmanager /opt/gurobi_server/linux64/resources/grb_rsm ./linux64/resources/grb_rsm
COPY --from=buildmanager /opt/gurobi_server/linux64/EULA.pdf ./linux64/EULA.pdf
ENV GRB_HOME=/opt/gurobi_server/linux64
ENV PATH $GRB_HOME/bin:$PATH
WORKDIR $GRB_HOME/bin
# changes group permissions to run as a non-root user for better security
RUN chgrp -R 0 /opt/gurobi_server/linux64/bin && \
chmod -R g=u /opt/gurobi_server/linux64/bin
# User to run the container
USER 1001
# expose command line
ENTRYPOINT ["grb_rsm", "--port=61080","--console-ts"]
EXPOSE 61080