-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (50 loc) · 1.91 KB
/
Dockerfile
File metadata and controls
66 lines (50 loc) · 1.91 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
64
65
66
# Use an official lightweight base image
FROM ubuntu:22.04
# Set environment variables for non-interactive installation
ENV DEBIAN_FRONTEND=noninteractive
# Update and install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
clang \
cmake \
curl \
git \
libssl-dev \
pkg-config \
software-properties-common \
python3-venv\
python3-pip \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Rust using rustup
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& . "$HOME/.cargo/env" \
&& rustup update \
&& rustup default stable
# Expose Rust's cargo binaries to PATH
ENV PATH="/root/.cargo/bin:$PATH"
# Install additional Rust components or tools if needed
RUN rustup component add clippy rustfmt
# Add a workspace directory
WORKDIR /workspace
# Copy ORPHEUS and library source code
COPY ./ORPHEUS /workspace/ORPHEUS/
COPY ./requirements.txt /workspace/
COPY ./openfhe-development /workspace/openfhe-development
COPY ./tfhe-rs /workspace/tfhe-rs
COPY ./README.md /workspace/
# Create a Python virtual environment and install requirements, then compile the tfhe-rs binding
RUN python3 -m venv /workspace/.venv_optimizer \
&& . /workspace/.venv_optimizer/bin/activate \
&& pip install --upgrade pip \
&& pip install -r /workspace/requirements.txt\
&& cd /workspace/ORPHEUS \
&& python -m maturin develop --release -m data_generation/tfhe_rs_binding/Cargo.toml
# compile and install openfhe
RUN cd openfhe-development && mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX=./local_install .. && make -j 10 && make install
# Compile the binding with openfhe
RUN . /workspace/.venv_optimizer/bin/activate\
&& cd /workspace/ORPHEUS \
&& python data_generation/openfhe_binding/setup.py install
# Default command (replace with your project's build or test commands)
CMD ["bash"]