-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
98 lines (66 loc) · 1.67 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y \
software-properties-common \
build-essential \
python3 \
python3-pip \
libzmq3-dev \
wget \
curl \
git
###
# Newer cmake
###
RUN wget https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-Linux-x86_64.sh -O ~/cmake-3.17.2-Linux-x86_64.sh
RUN chmod +x ~/cmake-3.17.2-Linux-x86_64.sh
RUN yes | ~/cmake-3.17.2-Linux-x86_64.sh --skip-license --prefix=/opt --include-subdir
RUN ln -s /opt/cmake-3.17.2-Linux-x86_64/bin/* /usr/bin
RUN cmake --version
###
# python and pip
###
RUN pip3 install -U pip
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
RUN rm -f /usr/bin/pip && ln -s /usr/bin/pip3 /usr/bin/pip
RUN python --version
RUN pip --version
RUN pip install numpy pandas matplotlib
###
# Install Qiskit
###
RUN pip install qiskit
###
# Install pyQuil and Forest SDK
###
RUN pip install pyquil
RUN wget http://downloads.rigetti.com/qcs-sdk/forest-sdk-2.22.0-linux-deb.tar.bz2 -O ~/forest-sdk-2.22.0-linux-deb.tar.bz2
RUN tar -xjvf ~/forest-sdk-2.22.0-linux-deb.tar.bz2 -C ~/
RUN yes | ~/forest-sdk-2.22.0-linux-deb/forest-sdk-2.22.0-linux-deb.run
RUN quilc -v
RUN qvm -v
###
# Install Qubit Toaster
###
RUN curl https://quantastica.com/toaster/install | /bin/sh
RUN pip install quantastica-qiskit-toaster
RUN qubit-toaster -v
###
# Install Cirq and qsim
###
RUN pip install cirq
RUN pip install qsimcirq
###
# Make output dir
###
RUN mkdir /root/output/
###
# Copy benchmark scripts
###
COPY ./benchmark_qft.py /root/benchmark_qft.py
COPY ./run_benchmarks.sh /root/run_benchmarks.sh
###
# Run benchmarks
###
WORKDIR "/root/"
ENTRYPOINT ["/bin/bash", "/root/run_benchmarks.sh"]