-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (40 loc) · 1.44 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM ubuntu:latest
ENV TZ="America/Toronto"
RUN apt-get update && \
apt-get -y update && \
apt-get install -yq tzdata && \
ln -fs /usr/share/zoneinfo/America/Toronto /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN apt-get install -y build-essential python3.10 python3-pip python3-dev \
libeigen3-dev cmake sudo git vim libgmp-dev
# Install pyqpp and pystaq
RUN pip3 -q install pip --upgrade
RUN pip3 install jupyter matplotlib numpy
RUN pip3 install git+https://github.com/softwareqinc/qpp
RUN pip3 install git+https://github.com/softwareqinc/staq
# Enable a normal user with sudo access
RUN useradd -m -c "softwareQ" sq
RUN echo '%sq ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER sq
# Clone and install Quantum++ and qpp_qasm
WORKDIR /home/sq
RUN git clone --depth 1 --branch main https://github.com/softwareqinc/qpp
WORKDIR /home/sq/qpp
RUN cmake -B build && \
cmake --build build --target qpp_qasm && \
sudo cmake --build build --target install && \
sudo cp build/qpp_qasm /usr/local/bin
USER sq
WORKDIR /home/sq
# Clone and install staq
WORKDIR /home/sq
RUN git clone --depth 1 --branch main https://github.com/softwareqinc/staq
WORKDIR /home/sq/staq
RUN cmake -B build -DINSTALL_SOURCES=ON && \
cmake --build build --target all --parallel 4 && \
sudo cmake --build build --target install
USER sq
WORKDIR /home/sq
# Create a notebook directory for Jupyter
RUN mkdir notebooks
COPY notebooks/* notebooks