zama-ai / concrete

Concrete: TFHE Compiler that converts python programs into FHE equivalent
Other
1.23k stars 144 forks source link

Build stalling on concrete-fftw-sys step #115

Closed 10d9e closed 2 years ago

10d9e commented 2 years ago

Describe the bug When I try to build the sample rust project in the docs, which includes concrete, it seems to stall during the initial import on the fftw build step.

To Reproduce Steps to reproduce the behaviour

  1. Use the following docker-compose file to start up a development container: docker-compose.yml
    version: '3.7'
    services:
    concrete-dev-node:
    image: rust
    container_name: concrete-dev-node
    command: apt-get update && apt-get install -y libfftw3-dev && tail -f /dev/null
    volumes:
      - .:/workspace
  2. Run docker-compose up -d to start the dev container.
  3. Setup initial project as described in the documentation ( https://docs.zama.ai/concrete/lib/installation.html#importing-concrete-in-your-project )
  4. On the compile and run step, the build stalls. It seems to be doing something, as my CPU fan is spinning hard, but it's stuck on the concrete-fftw-sys(build) step.

Expected behaviour The Build works as expected.

Evidence

root@5bee72071d4d:/workspace/play_with_fhe# RUSTFLAGS="-C target-cpu=native" cargo run --release 
    Updating crates.io index
   Compiling proc-macro2 v1.0.34
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.83
   Compiling autocfg v1.0.1
   Compiling serde_derive v1.0.132
   Compiling serde v1.0.132
   Compiling version_check v0.9.3
   Compiling typenum v1.14.0
   Compiling fs_extra v1.2.0
   Compiling libc v0.2.112
   Compiling memchr v2.4.1
   Compiling cc v1.0.72
   Compiling lazy_static v1.4.0
   Compiling opaque-debug v0.3.0
   Compiling bitflags v1.3.2
   Compiling either v1.6.1
   Compiling serde_json v1.0.73
   Compiling adler v1.0.2
   Compiling gimli v0.26.1
   Compiling concrete v0.1.11
   Compiling itoa v1.0.1
   Compiling cfg-if v1.0.0
   Compiling rustc-demangle v0.1.21
   Compiling ryu v1.0.9
   Compiling num-traits v0.2.14
   Compiling miniz_oxide v0.4.4
   Compiling generic-array v0.14.4
   Compiling concrete-fftw-sys v0.1.2
   Compiling itertools v0.9.0
   Compiling backtrace v0.3.63
   Compiling addr2line v0.17.0
   Compiling concrete-npe v0.1.9
   Compiling quote v1.0.10
   Compiling atty v0.2.14
   Compiling object v0.27.1
   Compiling colored v2.0.0
   Compiling cipher v0.2.5
   Compiling aes-soft v0.6.4
   Compiling concrete-csprng v0.1.7
   Compiling num-complex v0.4.0
   Compiling bincode v1.3.3
   Compiling concrete-commons v0.1.1
   Building [=======================>   ] 67/73: concrete-fftw-sys(build) 

Configuration(please complete the following information):

Additional context NA

tmontaigu commented 2 years ago

I can't reproduce, I can build normally the example in a Docker.

What os /hardware are you running docker on ? maybe it adds some overhead wich makes fftw build longer and make it seems like it stalled.

Also, try adding -vv to the cargo run/build command to have a more verbose output and see what is happening.

10d9e commented 2 years ago

Apologies - I just had to wait longer. It took ~15minutes. Thanks for the quick response!!

tmontaigu commented 2 years ago

I know on Windows + WSL the build takes ~20 min instead of ~2 minutes, so if you are running docker on windows with WSL backend that might be the cause

10d9e commented 2 years ago

cranking up the CPU % in docker settings helped tighten up the build time... cheers