quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.28k stars 1.02k forks source link

Create a minimal docker image from the repo #3346

Open balopat opened 4 years ago

balopat commented 4 years ago

Is your feature request related to a use case or problem? Please describe.

The current Dockerfile is broken. See #3194. Also, we'd like to publish our docker image regularly (see #3329).

Describe the solution you'd like

This issue is purely to make the current Dockerfile work - this will be the "slim" version described in #3329. It will be a multistage dockerfile that creates a minimal image that enables the user to run Cirq using jupyter notebook. At this point it is okay to have python 3.7 first as the baseimage. However, in #3194 we should upgrade the python runtime to 3.8 in our Docker image as well, so that our Docker image always reflects the latest python version that we support.

What is the urgency from your perspective for this issue? Is it blocking important work?

P2 - we should do it in the next couple of quarters

karlunho commented 4 years ago

@seunomonije I'm putting together some requirements into Google Docs for Docker Setup. Do you mind sending me an email at alankho@google.com with a gmail account so I can add you in ?

seunomonije commented 4 years ago

@balopat @karlunho starting on the Dockefile now. @karlunho I just emailed you for access to the google doc.

Reviewing the current file, I have 2 questions.

  1. What is the purpose of lines 8-11 shown below? https://github.com/quantumlib/Cirq/blob/50d9be8812ca5729344bdd58b33e21b7831f9105/Dockerfile#L8-L11
  2. Would you prefer the packages be installed to .local directory of the user, or in a virtual environment? Reviewing this link shows that cleaner/safer to just use a virtual environment.