-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile_for_pip
54 lines (46 loc) · 2.32 KB
/
Dockerfile_for_pip
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
FROM quay.io/pypa/manylinux2014_x86_64
RUN yum -y update && yum -y install \
curl \
zlib-devel \
eigen3-devel \
mpfr-devel \
gmp-devel \
&& yum clean all
RUN mkdir -p /opt/cmake \
&& curl -LO "https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2-Linux-x86_64.sh" \
&& sh cmake-3.16.2-Linux-x86_64.sh --skip-license --prefix=/opt/cmake \
&& rm -f cmake-3.16.2-Linux-x86_64.sh
# yum install boost-devel installs boost 1.53 and copy is the only way to install headers only boost
RUN curl -LO "https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.tar.gz" \
&& tar xf boost_1_85_0.tar.gz \
&& cd boost_1_85_0 \
&& ./bootstrap.sh \
&& ls \
&& cp -r boost /usr/local/include/ \
&& cd .. \
&& rm -rf boost
ADD install_cgal.sh /
RUN chmod +x install_cgal.sh && ./install_cgal.sh
ADD build-requirements.txt /
# gudhi requires numpy >= 1.15.0, but minimal numpy version for python 3.8 is 1.17.3 for instance
# numpy~=1.17.3 means any numpy=1.17.*, but also numpy>=1.17.3 (numpy~=1.17 do not work as it means any numpy==1.*)
# For python >=3.9, numpy >= 2.0 for package build and ABI compatibility with numpy 1.X and 2.X
# cf. https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice
RUN /opt/python/cp38-cp38/bin/python -m pip install numpy~=1.17.3\
&& /opt/python/cp38-cp38/bin/python -m pip install twine\
&& /opt/python/cp38-cp38/bin/python -m pip install -r build-requirements.txt\
&& /opt/python/cp39-cp39/bin/python -m pip install numpy>=2.0\
&& /opt/python/cp39-cp39/bin/python -m pip install -r build-requirements.txt\
&& /opt/python/cp310-cp310/bin/python -m pip install numpy>=2.0\
&& /opt/python/cp310-cp310/bin/python -m pip install -r build-requirements.txt\
&& /opt/python/cp311-cp311/bin/python -m pip install numpy>=2.0\
&& /opt/python/cp311-cp311/bin/python -m pip install -r build-requirements.txt\
&& /opt/python/cp312-cp312/bin/python -m pip install numpy>=2.0\
&& /opt/python/cp312-cp312/bin/python -m pip install -r build-requirements.txt
ENV PYTHON38="/opt/python/cp38-cp38/"
ENV PYTHON39="/opt/python/cp39-cp39/"
ENV PYTHON310="/opt/python/cp310-cp310/"
ENV PYTHON311="/opt/python/cp311-cp311/"
ENV PYTHON312="/opt/python/cp312-cp312/"
ENV PATH="/opt/cmake/bin:${PATH}"
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}"