-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
33 lines (26 loc) · 1.08 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
FROM ubuntu:latest
# Install dependencies
RUN apt-get -y update && \
apt-get install -y build-essential git cmake libssl-dev python3 python3-venv pip
# Get liboqs
RUN git clone --depth 1 --branch main https://github.com/open-quantum-safe/liboqs
# Install liboqs with stateful-signature algorithms enabled
RUN cmake -S liboqs -B liboqs/build \
-DBUILD_SHARED_LIBS=ON \
-DOQS_ENABLE_SIG_STFL_LMS=ON \
-DOQS_ENABLE_SIG_STFL_XMSS=ON \
-DOQS_HAZARDOUS_EXPERIMENTAL_ENABLE_SIG_STFL_KEY_SIG_GEN=ON && \
cmake --build liboqs/build --parallel 4 && \
cmake --build liboqs/build --target install
# Enable a normal user
RUN useradd -m -c "Open Quantum Safe" oqs
USER oqs
WORKDIR /home/oqs
# Create a Python 3 virtual environment
RUN python3 -m venv venv
# Get liboqs-python
RUN git clone --depth 1 --branch main https://github.com/open-quantum-safe/liboqs-python.git
# Install liboqs-python
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
ENV PYTHONPATH=$PYTHONPATH:/home/oqs/liboqs-python
RUN . venv/bin/activate && cd liboqs-python && pip install . && cd $HOME