Skip to content

Commit

Permalink
Add a light qiskit image and a full qiskit image (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickahell authored Mar 10, 2023
1 parent 8b5b2c0 commit c59ed39
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 65 deletions.
53 changes: 24 additions & 29 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,49 @@ on:
jobs:

build_qiskit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build the Docker qiskit-light
run: docker build --build-arg quantum_env=qiskit-light.sh . --file Dockerfile --tag quantum_lab_qiskit:main

runs-on: ubuntu-18.04

build_qiskit-full:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build the Docker qiskit
run: docker build --build-arg quantum_env=qiskit.sh . --file Dockerfile --tag quantum_lab_qiskit:main
- name: Build the Docker qiskit-light
run: docker build --build-arg quantum_env=qiskit-full.sh . --file Dockerfile --tag quantum_lab_qiskit-full:main

build_qml:

runs-on: ubuntu-18.04

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build the Docker qml
run: docker build --build-arg quantum_env=qml.sh . --file Dockerfile --tag quantum_lab_qml:main

build_qsharp:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- name: Build the Docker Q#
run: docker build --build-arg quantum_env=qsharp.sh . --file Dockerfile --tag quantum_lab_qsharp:main
# build_qsharp:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v2
# - name: Build the Docker Q#
# run: docker build --build-arg quantum_env=qsharp.sh . --file Dockerfile --tag quantum_lab_qsharp:main

build_simulaqron:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- name: Build the Docker SimulaQron
run: docker build --build-arg quantum_env=simulaqron.sh . --file Dockerfile --tag quantum_lab_simulaqron:main
# build_simulaqron:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v2
# - name: Build the Docker SimulaQron
# run: docker build --build-arg quantum_env=simulaqron.sh . --file Dockerfile --tag quantum_lab_simulaqron:main

build_myqlm:

runs-on: ubuntu-18.04

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build the Docker myQLM
run: docker build --build-arg quantum_env=myqlm.sh . --file Dockerfile --tag quantum_lab_myqlm:main

build_cirq:

runs-on: ubuntu-18.04

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build the Docker Cirq
Expand Down
75 changes: 45 additions & 30 deletions .github/workflows/docker-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:

build_qiskit:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set env
Expand All @@ -16,58 +16,73 @@ jobs:
env:
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
run: |
docker build --build-arg quantum_env=qiskit.sh . --file Dockerfile --tag mickahell/quantum_lab_qiskit:${RELEASE_VERSION}
docker build --build-arg quantum_env=qiskit-light.sh . --file Dockerfile --tag mickahell/quantum_lab_qiskit:${RELEASE_VERSION}
docker tag mickahell/quantum_lab_qiskit:${RELEASE_VERSION} mickahell/quantum_lab_qiskit:latest
docker login --username=mickahell --password=${DOCKERHUB_PASS}
docker push mickahell/quantum_lab_qiskit --all-tags
build_qml:
runs-on: ubuntu-18.04
build_qiskit-full:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build qml and push to Docker Hub
- name: Build qiskit-full and push to Docker Hub
env:
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
run: |
docker build --build-arg quantum_env=qml.sh . --file Dockerfile --tag mickahell/quantum_lab_qml:${RELEASE_VERSION}
docker tag mickahell/quantum_lab_qml:${RELEASE_VERSION} mickahell/quantum_lab_qml:latest
docker build --build-arg quantum_env=qiskit-full.sh . --file Dockerfile --tag mickahell/quantum_lab_qiskit-full:${RELEASE_VERSION}
docker tag mickahell/quantum_lab_qiskit-full:${RELEASE_VERSION} mickahell/quantum_lab_qiskit-full:latest
docker login --username=mickahell --password=${DOCKERHUB_PASS}
docker push mickahell/quantum_lab_qml --all-tags
docker push mickahell/quantum_lab_qiskit-full --all-tags
build_qsharp:
runs-on: ubuntu-18.04
build_qml:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build Q# and push to Docker Hub
- name: Build qml and push to Docker Hub
env:
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
run: |
docker build --build-arg quantum_env=qsharp.sh . --file Dockerfile --tag mickahell/quantum_lab_qsharp:${RELEASE_VERSION}
docker tag mickahell/quantum_lab_qsharp:${RELEASE_VERSION} mickahell/quantum_lab_qsharp:latest
docker build --build-arg quantum_env=qml.sh . --file Dockerfile --tag mickahell/quantum_lab_qml:${RELEASE_VERSION}
docker tag mickahell/quantum_lab_qml:${RELEASE_VERSION} mickahell/quantum_lab_qml:latest
docker login --username=mickahell --password=${DOCKERHUB_PASS}
docker push mickahell/quantum_lab_qsharp --all-tags
docker push mickahell/quantum_lab_qml --all-tags
build_simulaqron:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build SimulaQron and push to Docker Hub
env:
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
run: |
docker build --build-arg quantum_env=simulaqron.sh . --file Dockerfile --tag mickahell/quantum_lab_simulaqron:${RELEASE_VERSION}
docker tag mickahell/quantum_lab_simulaqron:${RELEASE_VERSION} mickahell/quantum_lab_simulaqron:latest
docker login --username=mickahell --password=${DOCKERHUB_PASS}
docker push mickahell/quantum_lab_simulaqron --all-tags
# build_qsharp:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v2
# - name: Set env
# run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# - name: Build Q# and push to Docker Hub
# env:
# DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
# run: |
# docker build --build-arg quantum_env=qsharp.sh . --file Dockerfile --tag mickahell/quantum_lab_qsharp:${RELEASE_VERSION}
# docker tag mickahell/quantum_lab_qsharp:${RELEASE_VERSION} mickahell/quantum_lab_qsharp:latest
# docker login --username=mickahell --password=${DOCKERHUB_PASS}
# docker push mickahell/quantum_lab_qsharp --all-tags

# build_simulaqron:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v2
# - name: Set env
# run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# - name: Build SimulaQron and push to Docker Hub
# env:
# DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
# run: |
# docker build --build-arg quantum_env=simulaqron.sh . --file Dockerfile --tag mickahell/quantum_lab_simulaqron:${RELEASE_VERSION}
# docker tag mickahell/quantum_lab_simulaqron:${RELEASE_VERSION} mickahell/quantum_lab_simulaqron:latest
# docker login --username=mickahell --password=${DOCKERHUB_PASS}
# docker push mickahell/quantum_lab_simulaqron --all-tags

build_myqlm:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set env
Expand All @@ -82,7 +97,7 @@ jobs:
docker push mickahell/quantum_lab_myqlm --all-tags
build_cirq:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set env
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:22.04

# Choose your quantum env
ARG quantum_env
#ARG quantum_env=qiskit.sh
#ARG quantum_env=qiskit-light.sh
#ARG quantum_env=qml.sh
#ARG quantum_env=qsharp.sh
#ARG quantum_env=simulaqron.sh
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@
- Python version install : [3.10](https://www.python.org/downloads/release/python-3104/)

## Getting started
- Build the image, run the following command line : <pre>docker build --build-arg quantum_env=qiskit.sh -t quantum_lab .</pre>
- You can replace `qiskit.sh` with the following one `qml.sh`, `qsharp.sh`, `simulaqron.sh`, `myqlm.sh` or `cirq.sh`
- Build the image, run the following command line : <pre>docker build --build-arg quantum_env=qiskit-light.sh -t quantum_lab .</pre>
- You can replace `qiskit-light.sh` with the following one `qiskit-full.sh`, `qml.sh`, `qsharp.sh`, `simulaqron.sh`, `myqlm.sh` or `cirq.sh`
- To create a new containeur and go inside, run the script : `./start.sh`

### Environment
- Libs common for every env : ```networkx, numpy, matplotlib, notebook, pandas, scipy, tk, vim```
- 6 libs setup are available, one for installating [PennyLane](https://pennylane.ai), one for using [Qiskit](https://qiskit.org), one for using [Q#](https://azure.microsoft.com/fr-fr/resources/development-kit/quantum-computing/), one for [SimulaQron](https://softwarequtech.github.io/SimulaQron/html/GettingStarted.html), one for [myQLM](https://atos.net/en/lp/myqlm) and one for [Cirq](https://quantumai.google/cirq).
- `qml.sh`
- Libs : ```autograd, pennylane, pennylane-sf, pennylane-qiskit```
- `qiskit.sh`
- Libs : ```qiskit, qiskit[visualization], qiskit-nature```
- `qiskit-light.sh`
- Libs : ```qiskit, qiskit[visualization]```
- `qiskit-full.sh`
- Libs : ```qiskit, qiskit[visualization], qiskit[nature], qiskit[finance], qiskit[optimization], qiskit[machine-learning]```
- `qsharp.sh`
- Libs : ```qsharp, iqsharp```
- `simulaqron.sh`
Expand Down
9 changes: 9 additions & 0 deletions build/qiskit-full.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

pip3 install qiskit
pip3 install 'qiskit[visualization]'

pip3 install qiskit[nature]
pip3 install qiskit[finance]
pip3 install qiskit[optimization]
pip3 install qiskit[machine-learning]
1 change: 0 additions & 1 deletion build/qiskit.sh → build/qiskit-light.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

pip3 install qiskit
pip3 install 'qiskit[visualization]'
pip3 install qiskit-nature

0 comments on commit c59ed39

Please sign in to comment.