forked from fusion-energy/cad_to_h5m
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
87 lines (64 loc) · 2.63 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# This Dockerfile creates an enviroment / dependancies needed to run the
# cad_to_h5m package.
# You will need to have you license file saved as license.lic in the same folder
# as this Dockerfile when building
# To build this Dockerfile into a docker image:
# docker build -t cad_to_h5m .
# To run the resulting Docker image:
# docker run -it cad_to_h5m
# docker image contains python 3.8 as default
FROM continuumio/miniconda3:4.9.2 as dependencies
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 \
CC=/usr/bin/mpicc CXX=/usr/bin/mpicxx \
DEBIAN_FRONTEND=noninteractive
RUN apt-get --allow-releaseinfo-change update
RUN apt-get update -y && \
apt-get upgrade -y
RUN apt-get install -y libgl1-mesa-glx \
libgl1-mesa-dev \
libglu1-mesa-dev \
freeglut3-dev \
libosmesa6 \
libosmesa6-dev \
libgles2-mesa-dev \
curl \
wget && \
apt-get clean
# install cubit dependencies
RUN apt-get install -y libx11-6
RUN apt-get install -y libxt6
RUN apt-get install -y libgl1
RUN apt-get install -y libglu1-mesa
RUN apt-get install -y libgl1-mesa-glx
RUN apt-get install -y libxcb-icccm4
RUN apt-get install -y libxcb-image0
RUN apt-get install -y libxcb-keysyms1
RUN apt-get install -y libxcb-render-util0
RUN apt-get install -y libxkbcommon-x11-0
RUN apt-get install -y libxcb-randr0
RUN apt-get install -y libxcb-xinerama0
# download cubit
RUN wget -O coreform-cubit-2021.5.deb https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/Releases/Linux/Coreform-Cubit-2021.5%2B15962_5043ef39-Lin64.deb
# install cubit
RUN dpkg -i coreform-cubit-2021.5.deb
RUN apt-get update
RUN apt-get install -y wget
# installs svalinn plugin for cubit
RUN wget https://github.com/svalinn/Cubit-plugin/releases/download/0.2.1/svalinn-plugin_debian-10.10_cubit_2021.5.tgz
RUN tar -xzvf svalinn-plugin_debian-10.10_cubit_2021.5.tgz -C /opt/Coreform-Cubit-2021.5
# writes a non commercial license file
# RUN printf 'Fri May 28 2021' >> /opt/Coreform-Cubit-2021.5/bin/licenses/cubit-learn.lic
RUN mkdir -p /root/.config/Coreform/licenses
RUN printf 'Fri May 28 2021' >> /root/.config/Coreform/licenses/cubit-learn.lic
# helps to identify Cubit related errrors
ENV CUBIT_VERBOSE=5
COPY requirements-test.txt requirements-test.txt
RUN pip install -r requirements-test.txt
FROM dependencies as final
COPY setup.py setup.py
COPY README.md README.md
COPY run_tests.sh run_tests.sh
COPY cad_to_h5m cad_to_h5m/
COPY tests tests/
COPY examples/*.py examples/
RUN python setup.py install