-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile_ubuntu20.04_mingw64
58 lines (49 loc) · 2.89 KB
/
Dockerfile_ubuntu20.04_mingw64
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
FROM ubuntu:20.04
ARG MPLAPACK_VER="2.0.1"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt -y update
RUN apt -y upgrade
RUN apt install -y sudo
RUN apt install -y tzdata
# set your timezone
ENV TZ Asia/Tokyo
RUN echo "${TZ}" > /etc/timezone \
&& rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata
RUN apt install -y build-essential mingw-w64 gfortran-mingw-w64 python3
RUN apt install -y autotools-dev automake libtool gnuplot
RUN apt install -y git wget time parallel
RUN apt install -y ng-common ng-cjk emacs-nox
RUN sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN apt install -y mingw-w64 gfortran-mingw-w64 gdb-mingw-w64
RUN dpkg --add-architecture i386
RUN mkdir -pm755 /etc/apt/keyrings
RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
RUN apt update -y
RUN apt install -y --install-recommends wine-stable
ARG DOCKER_UID=1000
ARG DOCKER_USER=docker
ARG DOCKER_PASSWORD=docker
RUN useradd -u $DOCKER_UID -m $DOCKER_USER --shell /bin/bash && echo "$DOCKER_USER:$DOCKER_PASSWORD" | chpasswd && echo "$DOCKER_USER ALL=(ALL) ALL" >> /etc/sudoers
USER ${DOCKER_USER}
RUN cd /home/$DOCKER_USER && echo "cd /home/$DOCKER_USER" >> .bashrc
RUN cd /home/$DOCKER_USER && echo "export WINEPATH=\"/usr/x86_64-w64-mingw32/lib/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix;/home/$DOCKER_USER/MPLAPACK/bin\"" >> .bashrc
RUN cd /home/$DOCKER_USER && echo "export PATH=\"/opt/wine-stable/bin/:$PATH\"" >> .bashrc
ARG WINEPATH="/usr/x86_64-w64-mingw32/lib/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix"
ARG WINEDEBUG="-all"
ARG PATH="/opt/wine-stable/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
RUN cd /home/$DOCKER_USER && echo "cd /home/$DOCKER_USER" >> .bashrc
RUN cd /home/$DOCKER_USER && wget https://github.com/nakatamaho/mplapack/releases/download/v${MPLAPACK_VER}/mplapack-${MPLAPACK_VER}.tar.xz
RUN cd /home/$DOCKER_USER && tar xvfJ mplapack-${MPLAPACK_VER}.tar.xz
RUN cd /home/$DOCKER_USER/mplapack-${MPLAPACK_VER}
ARG CXX="x86_64-w64-mingw32-g++"
ARG CC="x86_64-w64-mingw32-gcc"
ARG FC="x86_64-w64-mingw32-gfortran"
ARG NM="x86_64-w64-mingw32-nm"
ARG RANLIB="x86_64-w64-mingw32-ranlib"
ARG AR="x86_64-w64-mingw32-ar"
RUN cd /home/$DOCKER_USER/mplapack-${MPLAPACK_VER} && ./configure --prefix=$HOME/MPLAPACK --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --enable-gmp=yes --enable-mpfr=yes --enable-_Float128=yes --enable-qd=yes --enable-dd=yes --enable-double=yes --enable-_Float64x=yes --enable-test=yes --enable-benchmark=yes
RUN cd /home/$DOCKER_USER/mplapack-${MPLAPACK_VER} && make -j`getconf _NPROCESSORS_ONLN`
RUN cd /home/$DOCKER_USER/mplapack-${MPLAPACK_VER} && make install