-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (49 loc) · 1.63 KB
/
Dockerfile
File metadata and controls
63 lines (49 loc) · 1.63 KB
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 quay.io/pypa/manylinux2014_x86_64
RUN yum update -y && yum install -y curl wget
ENV PATH /opt/python/cp310-cp310/bin:${PATH}
ENV CMAKE_MODULE_PATH /opt/python/cp310-cp310/lib/cmake:/usr/local/lib64/cmake/
#
# install dependencies
#
RUN yum groupinstall -y 'Development Tools' && \
yum install -y autoconf git
RUN pip install cmake && ln -s /opt/python/cp310-cp310/bin/cmake /usr/bin/cmake
# install openFHE
# Pull from the early-release version with bootstrapping
WORKDIR /openFHE
RUN git clone --recursive \
https://github.com/openfheorg/openfhe-development.git/ && \
cd openfhe-development && \
mkdir openFHE-build && \
cd openFHE-build && \
cmake ../ && \
make -j4 && \
make install
# string formatting
RUN git clone https://github.com/fmtlib/fmt.git && \
cd fmt && \
mkdir _build && cd _build && \
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. && \
make -j4 && \
make install
# Install numpy
RUN pip install "numpy<2.0.0"
# Install boost
RUN set -ex; \
wget https://sourceforge.net/projects/boost/files/boost/1.84.0/boost_1_84_0.tar.gz/download -O boost_1_84_0.tar.gz; \
tar xzf ./boost_1_84_0.tar.gz; \
cd boost_1_84_0; \
./bootstrap.sh; \
./b2 install --with-python --prefix=/opt/python/cp310-cp310 -j 4
# openFHE is installed, now build the python packages
RUN mkdir openFHE-python
COPY . openFHE-python
RUN set -ex; \
pip install -U ninja wheel setuptools
CMD set -ex; \
pip wheel -e /openFHE/openFHE-python \
-w /wheelhouse/tmp/ \
--no-deps; \
cd /; \
auditwheel repair /wheelhouse/tmp/OpenFHE-*.whl; \
chmod -R 777 ./wheelhouse