Skip to content

Latest commit

 

History

History
121 lines (78 loc) · 4.62 KB

readme.md

File metadata and controls

121 lines (78 loc) · 4.62 KB

Qiskit-Metal docker

Docker Image Version latest-ubuntu Docker Image Version latest-minimal-jupyter Docker Pulls GitHub issues GitHub all releases GitHub pull requests

A community project to run your qiskit-metal project using docker.

Versions/tags

The qiskit-metal image is based on some other images.

base image tags size
ubuntu latest latest-ubuntu ~2Gb
minimal-notebook latest-minimal-jupyter ~3Gb

These are pretty the same thing, just with more dependencies or default tooling inside, but for qiskit-metal projects they are just the same.

Requirements

To use these images you must have installed on your host machine:

Also set your the DISPLAY environment variable, in case it wasn't configured before.

If you use linux or other unix like, probably you have the X installed and configured, otherwise you can see the xOrg website. For mac users, you may check the xQuartz. And finally, for windows users, check the either x410 or Cygwin/X.

The X is just required for the metal GUI application, so if you don't need that, just skip this step.

Finally, you may need to add the access permission to your X server, to do that, type:

xhost +local:docker

and then to remove the permission, after using the docker image, you can run:

xhost -local:docker

Using the images

The images are available on:

repository build
dockerHub dockerHub workflow
GHRC GHRC workflow

To use them, run:

# linux example
docker run -d -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY dpbm32/qiskit-metal:[tag]

# or (no metal GUI)
docker run -d dpbm32/qiskit-metal:[tag]

or

# linux example
docker run -d -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY ghcr.io/dpbm/qiskit-metal-docker:[tag]

# or (no metal GUI)
docker run -d ghcr.io/dpbm/qiskit-metal-docker:[tag]

If you want a simpler way to run it, you can use the docker compose. There're two files for that:

The default-compose.yaml has the default configuration to run the image based on Ubuntu, and the second one is a template for those who want to add your own settings.

This last one can be renamed for <whatever_you_want>.yaml.

To start the image using docker compose, run:

docker compose --project-directory ./ -f default-compose.yaml up -d

#or

docker compose --project-directory ./ -f <whatever>.yaml up -d

Then, access http://<docker_ip>:8888 on your browser. If you don't know the docker ip run:

docker inspect <containerID> | grep IPAddress

For real projects, you might want to create a volume to save your files. To do add volumes, checkout the official docker tutorial.

Contributing

If you enjoyed our project and want to help us evolve it, you can:

Be kind in your comments, and remember, there's another person across the monitor.