File tree 3 files changed +23
-5
lines changed
3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 60
60
- name : Install requirements
61
61
run : |
62
62
python3 -m pip install -r requirements.txt
63
+ - name : Upgrade libc
64
+ # An LLVM update broke this test, fix per is https://bugs.llvm.org/show_bug.cgi?id=27310.
65
+ run : |
66
+ sudo apt-get upgrade libc-bin=2.31-0ubuntu9.9
63
67
- name : Run C++ tests
64
68
run : |
65
69
bazel test --config=avx --config=openmp \
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ FROM debian
3
3
4
4
# Install requirements
5
5
RUN apt-get update
6
- RUN apt-get install -y python3-dev python3-pip
6
+ RUN apt-get install -y python3-dev python3-pip python3-venv
7
7
RUN apt-get install -y cmake git
8
8
9
+ # Create venv to avoid collision between system packages (e.g. numpy) and Cirq's deps.
10
+ RUN python3 -m venv test_env
11
+
12
+ # Activate venv.
13
+ ENV PATH="test_env/bin:$PATH"
14
+
9
15
COPY ./ /qsim/
10
16
RUN pip3 install /qsim/
11
17
Original file line number Diff line number Diff line change 2
2
FROM qsim
3
3
4
4
# Install additional requirements
5
- RUN apt-get install -y python3-dev python3-pybind11 python3-pytest python3-pip
5
+ RUN apt-get install -y python3-dev python3-pybind11 python3-pip python3-venv
6
6
7
- # The --force flag is used mainly so that the old numpy installation from pybind
8
- # gets replaced with the one cirq requires
9
- RUN pip3 install --prefer-binary cirq-core --force
7
+ # Create venv to avoid collision between system packages (e.g. numpy) and Cirq's deps.
8
+ RUN python3 -m venv test_env
9
+
10
+ # Activate venv.
11
+ ENV PATH="test_env/bin:$PATH"
12
+
13
+ # break-system-packages flag to override system packages (e.g. numpy) with Cirq's deps.
14
+ RUN pip3 install --prefer-binary cirq-core
10
15
11
16
# Copy relevant files
12
17
COPY ./pybind_interface/ /qsim/pybind_interface/
@@ -18,5 +23,8 @@ WORKDIR /qsim/
18
23
# Build pybind code early to cache the results
19
24
RUN make -C /qsim/ pybind
20
25
26
+ # Install pytest
27
+ RUN pip3 install pytest
28
+
21
29
# Compile and run qsim tests
22
30
ENTRYPOINT make -C /qsim/ run-py-tests
You can’t perform that action at this time.
0 commit comments