A community project to run your qiskit-metal project using docker.
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.
To use these images you must have installed on your host machine:
- Docker
- Docker compose (optional)
- xServer (for metal GUI)
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
The images are available on:
repository | build |
---|---|
dockerHub | |
GHRC |
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.
If you enjoyed our project and want to help us evolve it, you can:
- open an issue reporting a problem/feature request
- solve an issue
- check some PR
- add a PR
- complete a todo item
Be kind in your comments, and remember, there's another person across the monitor.