Local infrastructure setup¶
Step 1: Create a Python environment and clone the repository
The qiskit-serverless
repository contains some Dockerfiles which make spinning up a test cluster
on your local machine straightforward. The first thing we will do is clone the repository.
python3 -m venv /path/to/virtual/environment
source /path/to/virtual/environment/bin/activate
python3 -m venv c:\path\to\virtual\environment
c:\path\to\virtual\environment\Scripts\Activate.ps1
cd /path/to/workspace/
git clone git@github.com:Qiskit/qiskit-serverless.git
Step 2: Set up Docker
To set up Qiskit Serverless on your local machine, you will need to use docker compose.
Step 3: Initiate the test cluster
Once you have Docker and docker compose installed, you can run the following command from the root of the
qiskit-serverless
repository to set up the infrastructure:
$ docker compose [--profile <PROFILE>] up
Additionally, you can include the profile full. With the full profile installs all core services, including logging and monitorying systems.
Step 4: Run a program in the test environment
Once the containers are running, you can simulate a remote cluster with the resources on your local machine. To create and run programs in this simulated cluster, we recommend using Jupyter Lab. Refer to the Getting started guides for details about running your program remotely.