Skip to content

Deploy an example on the cloud

gcattan edited this page Sep 20, 2022 · 1 revision

When creating an example, your local computer may be limited in terms of ressources to emulate a quantum computer. Instead, you might want to use a cloud provider to run the example. Here we will provide the steps with the Google Cloud Plateform (other cloud providers offer similar functionnalities):

  1. Create a new branch with you example in your fork repository. Modify the /Dockerfile to redirect the entrypoint to your example. Make sure that the create_docker_image workflow passed.
  2. Open an account on Google Cloud (it required a billing account, but you will not be charged until you upgrade your account).
  3. Create a Cloud Run Service called pyriemmann-qiskit (or any project name which is suitable for you). For the moment use the default configuration, although you may want to already indicate the physical ressources:

image

  1. Create an artifactory repository, following the Create a Docker repository in Artifactory tutorial. Tutorials are displayed in the right side panel of the plateform. Make sure to indicate pyriemann-qiskit as a project (or the one you created instead).
  2. Create a new Cloud Build Trigger. Provide the required permissions to install the Google Build app on Github. This will allow Google Cloud to build a container image directly from your fork repository. The process is automated and you only need to follow the steps. For more details click here.
  3. Under Configuration>Type, select Dockerfile.
  4. Under Configuration>Location, select Repository and type Dockerfile in the input box Dockerfile name.
  5. Under Configuration>Location provide a value for the image name. It should be in the form: <XXX>-docker.pkg.dev/<name of your cloud run service>/<name of your docker repo>/<custom image name>:$COMMIT_SHA. You can copy the first part of this URL (except the image name) from your artifactory settings:

image

  1. Validate the trigger, and run it. Check everything passed.
  2. Edit the service you created in step 3, and select a Container Image URL. If everything went well, a new image should have been pushed in your artifact repository. It is also possible to specify a different entrypoint that the one provided in setp 1

image

  1. Validate the service and click on the Logs tab to see the output.