Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker image creation is stuck #878

Closed
simonadamprog opened this issue Mar 4, 2023 · 1 comment
Closed

docker image creation is stuck #878

simonadamprog opened this issue Mar 4, 2023 · 1 comment

Comments

@simonadamprog
Copy link

simonadamprog commented Mar 4, 2023

I'm trying to go through the readme part for running QuantumKatas locally.
I rebased my work branch recently with upstream.
I'm running the:

  1. Build the docker image and tag it katas:
    docker build -t katas .

And the command line is stuck at this point for half an hour now:

% docker build -t katas .
[+] Building 496.5s (8/10)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for mcr.microsoft.com/quantum/iqsharp-base:0.27.258160 0.3s
=> [internal] load build context 0.0s
=> => transferring context: 56.29kB 0.0s
=> CACHED [1/6] FROM mcr.microsoft.com/quantum/iqsharp-base:0.27.258160@sha256:1012bcc317e29ae70a7d46c1f67eb8487daf750d8841f90a494b44cb 0.0s
=> [2/6] COPY . /home/jovyan 0.5s
=> [3/6] RUN pip install -I --no-cache-dir matplotlib numpy pytest && chown -R jovyan /home/jovyan && 65.2s
=> [4/6] RUN cd /home/jovyan/ && dotnet restore ./tutorials/ExploringDeutschJozsaAlgorithm/AQ/ProviderDependencies.csproj 9.4s
=> [5/6] RUN cd /home/jovyan/ && for solution in $(find . -type f -name "*.sln"); do dotnet restore "$solution"; done && ./sc 421.0s
=> => # Restored /home/jovyan/QEC_BitFlipCode/QEC_BitFlipCode.csproj (in 3.26 sec).
=> => # Determining projects to restore...
=> => # Restored /home/jovyan/SuperdenseCoding/SuperdenseCoding.csproj (in 3.34 sec).
=> => # 1 of 2 projects are up-to-date for restore.
=> => # Prebuilding: BasicGates.ipynb in BasicGates kata...
=> => # [NbConvertApp] Converting notebook BasicGates/BasicGates.ipynb to markdown

I have an M1 proc. with .NET 6.0 (for this architecture) installed.
I also tried to run "dotnet test", but I'm getting the issue described in: microsoft/qsharp-compiler#1273
Can it be an issue also with this docker build that there is a mismatch between architectures?

UPDATE:
For second try it gave me this error:

=> => # Prebuilding: BasicGates.ipynb in BasicGates kata...
=> => # [NbConvertApp] Converting notebook BasicGates/BasicGates.ipynb to markdown
=> => # Assertion failed: p_rcu_reader->depth != 0 (/qemu/include/qemu/rcu.h: rcu_read_unlock: 101)

Yeah I guess it is a cpu architecture issue.

@tcNickolas
Copy link
Member

Apologies for the delay replying!

Yes, you're most likely correct that it's an issue with Mac M1 chips - I think it's the same issue as microsoft/qsharp-compiler#1362, though in Jupyter Notebooks it manifests slightly differently. You could try to set up the Katas as Q# projects and then use the workaround described in that issue to use an older version of the simulator that doesn't have this problem. This wouldn't work for Jupyter Notebooks, though, as the %kata magic uses CounterSimulator which, in turn, uses QuantumSimulator which exhibits this issue. I don't think there's an easy way to fix this in the Katas, since they have to rely on the simulator for the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants