diff --git a/docs/deployment/local.rst b/docs/deployment/local.rst index 49992987a..a750fb90b 100644 --- a/docs/deployment/local.rst +++ b/docs/deployment/local.rst @@ -2,29 +2,57 @@ Local infrastructure setup ========================== -To set up Quantum Serverless on your local machine, you will need to use `docker compose`_. +Step 1: Create a Python environment and clone the repository -.. _docker compose: https://docs.docker.com/compose/ +The ``quantum-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. -Once you have Docker and docker compose installed, you can run the following command to set up the infrastructure: +.. code-block:: + :caption: Create a minimal environment with only Python installed in it. We recommend using `Python virtual environments `_. + + python3 -m venv /path/to/virtual/environment .. code-block:: + :caption: Activate your new environment. - $ VERSION= docker compose [--profile ] up + source /path/to/virtual/environment/bin/activate -The available profiles are `full`, `jupyter`, and `repo`. -The repo profile installs core services and the program repository, -the jupyter profile installs core services and Jupyter Notebook, -and the full profile installs all core services, -Jupyter Notebook, and logging and monitoring systems. +.. code-block:: + :caption: Note: If you are using Windows, use the following commands in PowerShell. + + python3 -m venv c:\path\to\virtual\environment + c:\path\to\virtual\environment\Scripts\Activate.ps1 + +.. code-block:: + :caption: Clone the Quantum Serverless repository. -Available version can be found in `GitHub releases`_ page. + cd /path/to/workspace/ + git clone git@github.com:Qiskit-Extensions/quantum-serverless.git -.. _GitHub releases: https://github.com/Qiskit-Extensions/quantum-serverless/releases +Step 2: Set up Docker -For example, if you want to install version `0.6.3` with all services, -the command would be: +To set up Quantum Serverless on your local machine, you will need to use `docker compose`_. + +.. _docker compose: https://docs.docker.com/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 +``quantum-serverless`` repository to set up the infrastructure: .. code-block:: - $ VERSION=0.6.3 docker compose --profile full up + $ docker compose [--profile ] up + +The available profiles are `full`, `jupyter`, and `repo`. +The repo profile installs core services and the program repository; +the jupyter profile installs core services and Jupyter Notebook; +and the full profile installs all core services, including logging and +monitorying systems and jupyter. + +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, visit the Jupyter Lab +environment at `localhost:8888` via a web browser. Refer to the `Getting Started section <_getting_started>_` +for details about running your program remotely.