-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
63 lines (52 loc) · 1.72 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
58
59
60
61
62
63
FROM rocker/rstudio
MAINTAINER Rodrigo Martell <rodrigo.martell@gmail.com>
# IPoptr envrionment directory
ENV IPOPTR_DIR=/CoinIpopt/build/Ipopt/contrib
# Give the user root access, go on!
RUN echo "$USER ALL = NOPASSWD: ALL" >> /etc/sudoers && \
##################
# Download ipoptr source
# See these nasty files:
# http://www.coin-or.org/Ipopt/documentation/node10.html
##################
wget http://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.3.tgz && \
gunzip Ipopt-3.12.3.tgz && \
tar -xvf Ipopt-3.12.3.tar && \
rm -rf Ipopt-3.12.3.tar && \
mv Ipopt-3.12.3 CoinIpopt && \
cd CoinIpopt && \
# Downloading BLAS, LPACK, and ASL
cd ThirdParty/Blas && \
./get.Blas && \
cd ../Lapack && \
./get.Lapack && \
cd ../ASL && \
./get.ASL && \
# Download HSL Subroutines (need a license and academic email, seriious?!)
# Skip for now: http://www.coin-or.org/Ipopt/documentation/node13.html#SECTION00043100000000000000
# Downloading MUMPS Linear Solver
cd ../Mumps && \
./get.Mumps && \
# Get METIS
cd ../Metis && \
./get.Metis && \
##################
# Compile ipoptr
##################
cd ../../ && \
mkdir build && \
cd build && \
../configure -with-pic && \
make -j3 && \
make test && \
make install && \
##################
# Pre-install ipoptr
##################
echo "install.packages('/CoinIpopt/build/Ipopt/contrib/RInterface', repos=NULL, type='source')" \
>> installIpoptrPackage.R && \
r installIpoptrPackage.R && \
rm installIpoptrPackage.R
# Default CMD from
# https://github.com/rocker-org/rocker/blob/master/rstudio/Dockerfile
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]