# Setup Docker with Nvidia GPU support

{% hint style="info" %}
Setup time less than 5 minutes
{% endhint %}

{% hint style="warning" %}
Docker containers are currently supported on Data Center nodes only. On Consumer nodes, docker containers are supported only when rented on a monthly basis.

{% endhint %}

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.

To run docker containerized applications inside your Q Blocks instance you'd need the docker engine to be installed correctly with Nvidia GPU support.

## How to install Docker engine with GPU support?

Follow the steps below for successful installation:

1. Go to your Q Blocks instance and open the bash terminal in it.
2. Run the following command:

```bash
wget 'https://www.qblocks.cloud/resources/setup-docker-gpu.sh' --no-check-certificate -O - | bash
```

It should take 2-3 minutes of installation time and should return the following output:

"<mark style="color:green;">SUCCESSFULLY INSTALLED DOCKER WITH GPU SUPPORT.</mark>"

### How to use Docker with GPUs?

Once you have installed docker engine with GPU support in your Q Blocks instance, running a GPU enabled docker container is fairly straightforward.

For example, if you have 4 GPUs in your instance and you plan to use the first 2 GPUs out of them for a docker Image then simply run a command like this in your instance:

```bash
docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0,1 -it DOCKER_IMAGE
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qblocks.cloud/q-blocks-how-to-guide/setup-docker-with-nvidia-gpu-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
