ngnrsaa / qflex

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor network, CPU-based simulator of large quantum circuits.
Apache License 2.0
97 stars 24 forks source link

Improve dockerfile (depends on: #215) #220

Closed s-mandra closed 4 years ago

s-mandra commented 4 years ago

This should help issue #203.

s-mandra commented 4 years ago

This new Dockerfiles should allow a better layering. For instance, if only files in tests/src/ are modified, it only reconstruct the last layer (and it doesn't rebuild the qflex layer).

s-mandra commented 4 years ago

I think using a .dockerignore file is the canonical solution to this.

.dockerignore would help regarding not copying compiled libraries as *.o, but this wouldn't help with a better layering. With the latest modifications, changes to test/src/ won't affect layers that depends on src/ only. On the contrary, modifications to src/ would trigger docker to rebuild layers that depends upon src/ and tests/src.