-
Notifications
You must be signed in to change notification settings - Fork 10
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):
- Create a new branch with you example in your fork repository. Modify the
/Dockerfile
to redirect theentrypoint
to your example. Make sure that thecreate_docker_image
workflow passed. - Open an account on Google Cloud (it required a billing account, but you will not be charged until you upgrade your account).
- 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:
- 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 indicatepyriemann-qiskit
as a project (or the one you created instead). - 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. - Under
Configuration>Type
, selectDockerfile
. - Under
Configuration>Location
, selectRepository
and typeDockerfile
in the input boxDockerfile name
. - 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:
- Validate the trigger, and run it. Check everything passed.
- Edit the service you created in step
3
, and select aContainer 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 setp1
- Validate the service and click on the
Logs
tab to see the output.