{ "@context": "https://schema.org", "@type": "BlogPosting", "headline": "How to Set Up a Cloud GPU Instance (August 2026)", "description": "Set up a cloud GPU fast in August 2026. This guide covers provider choice, instance types, CUDA setup, cost control, and fixing the most common", "datePublished": "2026-07-17T15:29:25.072Z", "dateModified": "2026-08-13T20:31:16.609Z", "author": { "@type": "Organization", "name": "Thunder Compute Local" }, "url": "https://www.thundercompute.com/work/post/setup-cloud-gpu-instance", "wordCount": 3930, "keywords": [ "how to set up gpu in the cloud" ] }{ "@context": "https://schema.org", "@type": "FAQPage", "name": "How to Set Up a Cloud GPU Instance (July 2026)", "mainEntity": [ { "@type": "Question", "name": "What's the fastest way to set up a GPU in the cloud without configuring CUDA drivers yourself?", "acceptedAnswer": { "@type": "Answer", "text": "Use a provider that ships pre-built GPU images with CUDA, cuDNN, and framework dependencies already installed. AWS Deep Learning AMIs, Google Cloud Deep Learning VM Images, and Thunder Compute's pre-configured templates all skip 30–60 minutes of manual driver work and eliminate the most common class of version conflicts." } }, { "@type": "Question", "name": "Hyperscaler GPU cloud vs specialized GPU cloud: which should you use for ML training?", "acceptedAnswer": { "@type": "Answer", "text": "Specialized GPU clouds hit the better price-to-performance ratio for most ML training and inference workloads. AWS p4d.24xlarge instances run at $42.77/hr, while providers like Thunder Compute offer H100 access at significantly lower on-demand rates. Hyperscalers make more sense when your training job is tightly coupled to managed services you already depend on, like RDS or BigQuery." } }, { "@type": "Question", "name": "How do I verify my GPU is working correctly after setting up a cloud instance?", "acceptedAnswer": { "@type": "Answer", "text": "Run `nvidia-smi` immediately after connecting to confirm your GPU model, driver version, and memory are visible. Follow that with `python3 -c \"import torch; print(torch.cuda.is_available())\"` to confirm your framework can access the GPU. If PyTorch returns `False`, your installed CUDA toolkit version likely exceeds what your driver supports, which you can check by cross-referencing the CUDA Version field in `nvidia-smi` output against NVIDIA's compatibility table." } }, { "@type": "Question", "name": "Spot vs on-demand GPU instances: when does each pricing model make sense?", "acceptedAnswer": { "@type": "Answer", "text": "Spot instances cut costs by 60–90% but can be interrupted mid-run, so they work best for distributed training jobs that checkpoint regularly. On-demand instances are the right call for inference serving, time-sensitive jobs, or any workload where an unexpected interruption causes real damage. If you're iterating quickly on model code, on-demand with per-second billing keeps costs predictable without the interruption risk." } }, { "@type": "Question", "name": "Can I run GPU workloads in the cloud without managing SSH sessions or remote filesystems?", "acceptedAnswer": { "@type": "Answer", "text": "Yes. Thunder Compute Local lets you run GPU workloads directly from your terminal with `tnr run python train.py`, streaming output back as if the job were running locally. Instance provisioning, environment replication, and teardown happen automatically, so there's no separate SSH session to manage or remote filesystem to sync." } }, { "@type": "Question", "name": "What's the best GPU for inference workloads vs. serious training runs in the cloud?", "acceptedAnswer": { "@type": "Answer", "text": "For inference and lighter fine-tuning, a T4 or A10G gives you solid throughput at a lower hourly rate. For full training runs, LLM fine-tuning, or multi-GPU jobs, you want an H100 — the SXM5 variant in particular delivers meaningfully faster throughput on transformer workloads compared to its PCIe counterpart." } }, { "@type": "Question", "name": "How do I avoid CUDA version mismatch errors when setting up a GPU cloud instance?", "acceptedAnswer": { "@type": "Answer", "text": "Run `nvidia-smi` after connecting and check the CUDA Version field in the top-right corner — that number reflects the maximum CUDA version your driver supports. Cross-reference it against NVIDIA's compatibility table before installing any toolkit, and if you're on a pre-built AMI, confirm the bundled driver meets the minimum version your framework requires before proceeding." } }, { "@type": "Question", "name": "Should I install the CUDA driver bundled with the CUDA toolkit installer, or keep my existing driver?", "acceptedAnswer": { "@type": "Answer", "text": "Skip the bundled driver if you already have a working NVIDIA driver confirmed by `nvidia-smi`. Installing a second driver on top of an existing one creates conflicts that typically require a full driver wipe to fix. Use the `--toolkit` flag with the runfile-based installer, or install via `cuda-toolkit-12-x` with apt, which excludes the driver by default." } }, { "@type": "Question", "name": "How do egress fees affect the real cost of running GPU workloads in the cloud?", "acceptedAnswer": { "@type": "Answer", "text": "Egress fees on major cloud providers typically run $0.08–$0.12 per GB, and they add up fast when you're moving large model checkpoints or datasets between runs. Co-locating your storage and compute in the same region eliminates cross-region transfer charges entirely, and using object storage like S3 or GCS between runs keeps you from paying for high-performance attached storage that sits idle." } }, { "@type": "Question", "name": "What's the difference between an H100 SXM5 and H100 PCIe instance, and does it matter for your workload?", "acceptedAnswer": { "@type": "Answer", "text": "The SXM5 variant offers higher memory bandwidth and better multi-GPU scaling via NVLink, which matters for distributed training across multiple GPUs. The PCIe variant is adequate for single-GPU inference or smaller training runs. Both carry the H100 label, so always check the full spec sheet — the GPU name alone doesn't tell you which variant you're getting." } }, { "@type": "Question", "name": "How do I fix an out-of-memory error on a GPU cloud instance without switching to a larger GPU?", "acceptedAnswer": { "@type": "Answer", "text": "Start by halving your batch size — this resolves most OOM errors without touching the model. If memory still grows across iterations, call `torch.cuda.empty_cache()` between inference calls to release cached allocations, or switch to mixed-precision training with `torch.cuda.amp.autocast()`, which roughly halves VRAM usage for most transformer models." } }, { "@type": "Question", "name": "PyTorch vs TensorFlow for GPU cloud setup: which is easier to get running?", "acceptedAnswer": { "@type": "Answer", "text": "PyTorch is the more predictable install — point pip at the correct CUDA index URL and you get a GPU-compatible build in one command. TensorFlow 2.x bundles CUDA and cuDNN as Python packages via `pip install tensorflow[and-cuda]`, which avoids system-level CUDA management but ships CUDA versions that lag slightly behind official NVIDIA releases." } }, { "@type": "Question", "name": "How do I set up Jupyter on a remote GPU instance and access it from my local browser?", "acceptedAnswer": { "@type": "Answer", "text": "Launch JupyterLab on the remote instance with `--no-browser --ip=0.0.0.0 --port=8888`, then forward the port over SSH on your local machine with `ssh -L 8888:localhost:8888 user@your-instance-ip`. For sessions that survive disconnects, wrap the Jupyter process in `tmux` or `screen` before launching." } }, { "@type": "Question", "name": "Can I build a reproducible GPU environment that works the same way across cloud instances?", "acceptedAnswer": { "@type": "Answer", "text": "Docker with NVIDIA's Container Toolkit is the most reliable way to get there. Pull a pinned image from NVIDIA's NGC registry — for example `nvcr.io/nvidia/pytorch:24.01-py3` — and the container carries its own CUDA, cuDNN, and framework versions rather than depending on whatever is installed at the system level. Pinning to a specific image tag prevents version drift between runs." } }, { "@type": "Question", "name": "How do GPU instance quota limits work, and how do you avoid getting blocked mid-project?", "acceptedAnswer": { "@type": "Answer", "text": "GPU instance quotas are set at the account level and default to zero for high-end hardware on most major providers. Submit a quota increase request through your provider's console before you need the capacity — approval can take anywhere from a few hours to a couple of days, so request headroom ahead of a deadline, not during one." } } ], "url": "https://www.thundercompute.com/work/post/setup-cloud-gpu-instance", "dateModified": "2026-07-17T15:29:24.215Z", "author": { "@type": "Organization", "name": "Thunder Compute Local" } }
Renting a cloud GPU is easy. Getting it to actually run your workload without a driver mismatch, an out-of-memory error, or a surprise egress bill is where most people hit a wall. This guide walks you through the whole setup, from choosing a provider to running your first job.
TLDR:
tnr run python train.pyNot every GPU cloud provider works the same way, and picking the wrong one can cost you hours of setup time or hundreds of dollars in wasted compute. The right choice depends on your workload type, budget, and how much infrastructure overhead you want to manage.
There are a few key factors worth weighing before you commit to a provider.
You broadly have three options: hyperscalers, specialized GPU clouds, and bare-metal rentals.
Hyperscalers like AWS, GCP, and Azure offer deep integration with managed services and strong SLAs, but their GPU pricing tends to carry a steep premium. AWS p4d.24xlarge instances, for example, run at $42.77/hr.
The cheapest GPU cloud providers focus exclusively on GPU workloads and typically undercut hyperscaler pricing by a wide margin. Thunder Compute falls into this category, with H100 access at rates well below what major cloud providers charge for equivalent hardware.
Bare-metal GPU rentals give you the most control and often the lowest per-hour cost, but they require more hands-on configuration and lack the managed tooling that speeds up deployment.
| provider type | pricing | setup complexity | managed services |
|---|---|---|---|
| hyperscalers (AWS, GCP, Azure) | highest | low | extensive |
| specialized GPU clouds | lower | low to medium | moderate |
| bare-metal rentals | lowest | high | minimal |
For most developers and researchers running iterative ML experiments or inference workloads, a specialized GPU cloud hits the right balance between cost and convenience. Hyperscalers make more sense when your workload is tightly coupled with other managed services you already rely on.
Choosing the right GPU instance shapes everything that follows: cost, performance, and whether your workload even fits in memory. Before you spin anything up, it's worth understanding what the specs actually mean.
Cloud GPU instances vary across three core dimensions: compute power (measured in TFLOPS), memory capacity (VRAM), and interconnect bandwidth. Each of these affects a different class of workload. Inference jobs are often memory-bandwidth bound, training runs are compute bound, and multi-GPU workloads live or die by interconnect speed.
Most cloud providers organize GPU offerings into a few recognizable tiers based on the underlying NVIDIA hardware:
| spec | why it matters |
|---|---|
| VRAM | Determines the maximum model size you can load. Undersizing here means OOM errors, not slowdowns. |
| Memory bandwidth | Governs how fast data moves to the GPU cores. Critical for inference throughput. |
| NVLink vs PCIe | NVLink delivers far higher GPU-to-GPU bandwidth, which matters for distributed training across multiple GPUs. |
| Interconnect to CPU | High-bandwidth CPU-GPU connections reduce data pipeline bottlenecks, especially for preprocessing-heavy workloads. |
One thing to watch: providers sometimes list the same GPU model across different instance families with meaningfully different configurations. An H100 PCIe instance and an H100 SXM5 instance are not equivalent, even though both carry the H100 label. Always check the full spec sheet, beyond the GPU name alone.
Instance naming conventions also vary by provider. AWS uses families likp4dp5a2a3NC and ND series. The naming tells you little about raw performance; the underlying GPU model and memory configuration are what matter.
Once your provider account is ready, the actual instance setup takes only a few steps. The process varies slightly by provider, but the core workflow is consistent across AWS, Google Cloud, Azure, and most GPU cloud services.
Before launching, you need to match the GPU to your workload. The wrong choice means either overpaying for unused capacity or hitting memory limits mid-run.
Most providers give you a web console, CLI, or API to spin up an instance. The CLI route is faster for repeat setups. On AWS, for example, you would use the EC2 GPU instances launch wizard or run an aws ec2 run-instances command with your chosen AMI and instance type. On Google Cloud, gcloud compute instances create handles the same job.
When configuring the instance, pay attention to:
After the instance starts, SSH into it and run nvidia-smi. This command outputs your GPU model, driver version, memory usage, and current utilization. If the GPU is not showing up, the driver may not be installed or may need a reboot to load properly.
A quick sanity check before running any workload:
nvidia-smi
python3 -c "import torch; print(torch.cuda.is_available())"
Both should return positive results before you proceed. If PyTorch reports False, your CUDA installation likely does not match the installed driver version. Reinstalling the matching CUDA toolkit resolves this in most cases.
Once your instance is running, the first real task is getting NVIDIA drivers installed correctly. Skipping this step or rushing through it causes more failed GPU setups than almost anything else.
Most cloud providers offer GPU-optimized AMIs or images with drivers pre-installed, and you should use them when available. AWS offers the Deep Learning AMI, Google Cloud has Deep Learning VM Images, and Azure provides NC-series VM images with CUDA drivers bundled in. Starting from one of these saves you 30 to 60 minutes of manual setup and eliminates a common class of driver version conflicts.
If you are starting from a base Ubuntu image, you will need to install drivers manually.
Before touching any driver packages, run a full system update to avoid dependency conflicts:
sudo apt-get update && sudo apt-get upgrade -y
Then install the NVIDIA driver. For most deep learning workloads on current-generation hardware, the 535 or 545 series drivers work reliably:
sudo apt-get install -y nvidia-driver-545
sudo reboot
After the instance restarts, verify the installation with:
nvidia-smi
A successful output shows your GPU model, driver version, and CUDA version. If you see "No devices found" or a command not found error, the driver did not install correctly, which usually points to a kernel mismatch or a missing dependency.
The CUDA toolkit is separate from the driver and required for any GPU-accelerated workloads. NVIDIA's official CUDA downloads page lets you select
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install -y cuda-toolkit-12-3
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
.bashrc.zshrcnvcc --version to confirm the toolkit is accessible. At this point, your GPU instance is ready to run workloads.
The previous section walked through getting drivers installed and showed the basic CUDA toolkit commands for Ubuntu 22.04. Before running those commands, there's a decision point that trips people up: picking the right CUDA version and figuring out what to do about the driver that ships bundled with the CUDA installer.
NVIDIA maintains a forward-compatibility model where newer CUDA versions require a minimum driver version. If your driver is too old, CUDA will install without complaint but fail silently at runtime. Before downloading, check your installed driver version with nvidia-smi and cross-reference it against NVIDIA's CUDA compatibility table. As a rough guide:
Mismatches are common when using a pre-installed AMI that ships with an older driver. If your framework requires CUDA 12.6 but your driver only supports 12.3, update the driver before proceeding.
CUDA installers offer to install a driver alongside the toolkit. If you already have a working NVIDIA driver verified with nvidia-smi, skip the bundled driver. Installing it on top of an existing driver creates conflicts and usually requires a full driver wipe to recover.
When running the runfile-based CUDA installer, uncheck the driver option explicitly:
sudo sh cuda_12.3.0_545.23.06_linux.run --toolkit --silent --override
The --toolkit flag installs only the toolkit and leaves your existing driver untouched. For the apt-based method, the cuda-toolkit-12-3 package excludes the driver by default, so no extra flags are needed.
Most deep learning frameworks need cuDNN on top of the CUDA toolkit. After CUDA is installed, download the cuDNN package matching your CUDA version from NVIDIA's developer portal (an account is required). For CUDA 12.x on Ubuntu:
sudo apt-get install -y libcudnn9-cuda-12
cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
With your CUDA stack confirmed, the next layer is the actual software you'll run workloads in. Choices about frameworks, notebooks, and containerization all affect how smoothly your GPU workload runs in practice.
PyTorch is the default choice for most ML research and production fine-tuning work. Installing it via pip with the correct CUDA index URL is the safest way to get a GPU-compatible build:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Swap cu121 for your CUDA version (e.g., cu118 for CUDA 11.8). After installing, verify GPU access with:
python3 -c "import torch; print(torch.cuda.get_device_name(0))"
TensorFlow handles installation slightly differently. Google ships GPU support in the base package for TensorFlow 2.x:
pip install tensorflow[and-cuda]
This pulls in the required CUDA and cuDNN libraries as Python packages, which is useful on instances where you want to avoid system-level CUDA management. One trade-off: the packaged CUDA versions lag slightly behind official NVIDIA releases.
Running Jupyter on a remote GPU instance requires a small amount of configuration to make it accessible from your local browser. Start by installing Jupyter and setting a password:
pip install jupyterlab
jupyter lab --generate-config
jupyter lab password
Then launch Jupyter without opening a browser, bound to all interfaces:
jupyter lab --no-browser --ip=0.0.0.0 --port=8888
On your local machine, forward the port over SSH:
ssh -L 8888:localhost:8888 user@your-instance-ip
Open localhost:8888 in your browser and enter the password you set. For persistent sessions that survive disconnects, wrap the Jupyter process in tmux or screen before launching.
Docker is worth the setup cost when you need your environment to be reproducible across runs or shareable with teammates. NVIDIA's Container Toolkit lets Docker containers access the host GPU directly:
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
docker run --gpus all nvcr.io/nvidia/pytorch:24.01-py3
NGC images are versioned by month and framework version, so 24.01-py3refers to the January 2024 PyTorch image. Pinning to a specific image tag is one of the simplest ways to lock your environm ent and avoid version drift between runs.
This approach also makes moving workloads between instances much cleaner, since the container carries its own dependency graph instead of relying on what is installed at the system level.
Cloud GPU costs can spiral fast if you're not paying attention. Pricing models vary across providers, instance types, and regions, and a few misconfigured or idle instances can quietly drain your budget over a billing cycle.
Most major providers offer two core pricing tiers. On-demand instances give you guaranteed availability at a fixed hourly rate. Cloud GPU spot instances let you bid on unused capacity at steep discounts, often 60 to 90% cheaper, but they can be interrupted with little warning.
For fault-tolerant workloads like distributed training jobs with checkpointing, spot instances are a practical way to cut costs. For inference serving or time-sensitive jobs where interruption is unacceptable, on-demand is the safer choice.
One of the most common sources of wasted spend is over-provisioning. Running a multi-GPU instance for a workload that fits on a single GPU doubles or quadruples your hourly cost with no performance gain.
Before committing to an instance size, profile your workload:
Compute costs get most of the attention, but storage and egress fees add up. Keeping large datasets on high-performance attached storage when they're only accessed once per training run is a common oversight.
A few practical habits help here:
If you're running recurring training jobs or serving variable inference traffic, autoscaling can prevent you from paying for idle GPU time. Most cloud providers offer managed autoscaling groups or Kubernetes-based GPU node pools that spin resources up and down based on demand. Pairing autoscaling with a job scheduler like Ray or Slurm gives you tighter control over when GPUs are actually allocated versus sitting idle.
Even with careful setup, GPU cloud environments have a handful of failure modes that show up repeatedly. Most are fixable in minutes once you know what to look for.
This is the most common failure after a fresh setup. The symptom is usually PyTorch reporting False for CUDA availability, or a runtime error mentioning a CUDA version the driver does not support. Run nvidia-smi and check the "CUDA Version" field in the top right corner. That number reflects the maximum CUDA version your current driver supports. If your installed toolkit exceeds it, you need to either downgrade the toolkit or update the driver. NVIDIA's CUDA compatibility table maps driver versions to supported CUDA releases, and cross-referencing those two numbers resolves most mismatches.
OOM errors during training or inference usually mean one of three things: your model is too large for the available VRAM, your batch size is too high, or memory fragmentation is accumulating across iterations.
torch.cuda.empty_cache() between inference calls if you see memory grow over time. It releases cached allocations the framework is holding onto, though it does not free memory held by live tensors.torch.cuda.amp.autocast() if your workload tolerates fp16. It roughly halves VRAM usage for most transformer models.If you can SSH into your instance but cannot reach Jupyter or a model serving endpoint, a firewall rule is likely blocking the port. Check your security group (AWS), VPC firewall (GCP), or network security group (Azure) and confirm the relevant port is open to your IP. For Jupyter, that is typically port 8888. SSH port forwarding sidesteps this entirely for local browser access, which is worth using when you do not need a publicly exposed endpoint.
GPU instance quotas are set at the account level and are often zero by default for high-end hardware. If your launch fails with a quota or limit error, submit a quota increase request through your provider's console before you need the capacity. Approval can take anywhere from a few hours to a couple of days on major providers, so request headroom before a deadline, not during one.
Thunder Compute Local gives you GPU access without the overhead of managing cloud infrastructure yourself. You get a dedicated GPU instance that behaves like a local machine, so your existing tools, workflows, and scripts work out of the box.
Getting started takes about five minutes. Here's the setup process:
pip install thunder-computetnr logintnr run followed by your usual command, such as tnr run python train.pyThunder Compute supports a range of NVIDIA GPUs, including the H100, which covers most deep learning training and inference workloads. Pricing is pay-as-you-go with per-second billing, so you only pay for the compute you actually use.
This setup works well in specific situations:
The key distinction from traditional cloud GPU providers is the local-first interface. You keep your development environment intact, and Thunder Compute handles instance provisioning, environment replication, and teardown automatically. There's no separate SSH session to manage or remote filesystem to sync.
Most GPU setup headaches come down to version mismatches, over-provisioned instances, or idle compute you forgot to stop. Knowing what to check before you launch puts you ahead of most of those issues. From there, your focus can stay on the actual work. Check out Thunder Compute if you want to run GPU workloads without managing the infrastructure yourself.
Use a provider that ships pre-built GPU images with CUDA, cuDNN, and framework dependencies already installed. AWS Deep Learning AMIs, Google Cloud Deep Learning VM Images, and Thunder Compute's pre-configured templates all skip 30 to 60 minutes of manual driver work and eliminate the most common class of version conflicts.
Specialized GPU clouds hit the better price-to-performance ratio for most ML training and inference workloads. AWS p4d.24xlarge instances run at $42.77/hr, while providers like Thunder Compute offer H100 access at meaningfully lower on-demand rates. Hyperscalers make more sense when your training job is tightly coupled to managed services you already depend on, like RDS or BigQuery.
Run nvidia-smi immediately after connecting to confirm your GPU model, driver version, and memory are visible. Follow that with python3 -c "import torch; print(torch.cuda.is_available())" to confirm your framework can access the GPU. If PyTorch returns False, your installed CUDA toolkit version likely exceeds what your driver supports, which you can check by cross-referencing the CUDA Version field in nvidia-smi output against NVIDIA's compatibility table.
Spot instances cut costs by 60 to 90% but can be interrupted mid-run, so they work best for distributed training jobs that checkpoint regularly. On-demand instances are the right call for inference serving, time-sensitive jobs, or any workload where an unexpected interruption causes real damage. If you're iterating quickly on model code, on-demand with per-second billing keeps costs predictable without the interruption risk.
Yes. Thunder Compute Local lets you run GPU workloads directly from your terminal with tnr run python train.py, streaming output back as if the job were running locally. Instance provisioning, environment replication, and teardown happen automatically, so there's no separate SSH session to manage or remote filesystem to sync.