File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Base OS
2- FROM debian
2+ FROM ubuntu:24.04
33
4- # Install baseline
5- RUN apt-get update
6- RUN apt-get install -y g++ make wget
4+ # Update package list & install some basic tools we'll need.
5+ RUN apt update
6+ RUN apt install -y make g++ wget git
7+
8+ # The default version of CMake is 3.28. Get a newer version from Kitware.
9+ RUN apt remove --purge --auto-remove cmake
10+ RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7-linux-x86_64.sh
11+ RUN sh cmake-3.31.7-linux-x86_64.sh --prefix=/usr/local --skip-license
712
813# Copy relevant files for simulation
914COPY ./Makefile /qsim/Makefile
1015COPY ./apps/ /qsim/apps/
1116COPY ./circuits/ /qsim/circuits/
1217COPY ./lib/ /qsim/lib/
1318
14- WORKDIR /qsim/
19+ # Copy Python requirements file for other images based on this one.
20+ COPY ./requirements.txt /qsim/requirements.txt
1521
16- # Compile qsim
22+ # Compile qsim.
23+ WORKDIR /qsim/
1724RUN make qsim
1825
1926ENTRYPOINT ["/qsim/apps/qsim_base.x" ]
Original file line number Diff line number Diff line change 11# Base OS
2- FROM debian
2+ FROM ubuntu:24.04
33
4- # Install requirements
4+ # Update package list & install some basic tools we'll need.
55RUN apt-get update
6- RUN apt-get install -y python3-dev python3-pip python3-venv
7- RUN apt-get install -y cmake git
6+ RUN apt-get install -y python3-dev python3-pip python3-venv wget git
87
9- # Create venv to avoid collision between system packages (e.g. numpy) and Cirq's deps.
8+ # The default version of CMake is 3.28. Get a newer version from Kitware.
9+ RUN apt remove --purge --auto-remove cmake
10+ RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7-linux-x86_64.sh
11+ RUN sh cmake-3.31.7-linux-x86_64.sh --prefix=/usr/local --skip-license
12+
13+ # Copy qsim files from the outside-Docker location to an inside-Docker location.
14+ COPY ./ /qsim/
15+ WORKDIR /qsim/
16+
17+ # Use venv to avoid collision between system packages (e.g., NumPy) and our deps
1018RUN python3 -m venv test_env
1119
1220# Activate venv.
1321ENV PATH="test_env/bin:$PATH"
1422
15- COPY ./ /qsim/
16- RUN pip3 install /qsim/
23+ # Install dev requirements
24+ RUN pip3 install -r dev-requirements.txt
25+
26+ # Install qsim from the local sources
27+ RUN pip3 install .
1728
18- # Run test in a non-qsim directory
29+ # Run tests in a non-qsim directory
1930COPY ./qsimcirq_tests/ /test-install/
2031
2132WORKDIR /test-install/
You can’t perform that action at this time.
0 commit comments