-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathDockerfile
29 lines (22 loc) · 904 Bytes
/
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
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
RUN cmake -S liboqs -B liboqs/build -DBUILD_SHARED_LIBS=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