GPU Cloud Server

Set up a deep learning environment using a Windows GPU cloud host

2026-01-28 01:56:44

Background

The following table shows the instance environment.

Instance Type

pi2.2xlarge.4

OS

Windows Server 2019 Data Center Edition 64-bit Chinese Version

CPU

8vCPU

Memory

32GB

GPU

One NVIDIA T4

Versions of driver, library, and software

CUDA11.3.0, Python 3.9, cuDNN8.2.1, Pytorch 1.11.0, and Tensorflow_gpu_2.6.0

            

Description                  

For more information on how to select a proper version, see How to Select a Driver, Library, or Software Version.          


Procedure

Step 1: Create a GPU instance

Create a GPU cloud server instance by referring to User Guide ->Create GPU Cloud Server > Create GPU Cloud Server Without Driver.

Step 2: Install the graphics card driver

1. Log in to the created GPU cloud server by referring to Overview of Logging In to Windows-based ECS.

2. Visit NVIDIA website and select your desired driver version for the graphics card. Click Search to go to the download page and click to download the driver.

3. Then, complete the installation as instructed.

Step 3: Install CUDA

1. Visit the NVIDIA official website, find CUDA Toolkit Archive, and select your desired version.

            

2. On the CUDA Toolkit 11.3.0 Download page, select the system configuration.

            

3. Click Download to start the download.

4. After the download is complete, double-click the installation package and install the toolkit as instructed.

            

Pay attention to the following steps:

In the CUDA Setup Package window that appears, Extraction path is the temporary storage address and need no change. Keep the default and click OK.

            

In the License Agreement step, select Custom and click Next.

            

Select and install components as needed and click Next.

            

After the installation is complete, restart the cloud server as instructed.

Step 4: Configure environment variables

1. On the operating system interface , use the shortcut win+R to open the Run window.

2. In the Run window, enter sysdm.cpl and click OK.

            

3. In the displayed System Properties window, click the Advanced tab and click Environment Variables.

            

4. Select Path in the system variable and click Edit.

            

5. In the Edit Environment Variables window that appears, create and enter the following environment variable configurations (you do not have to create existing configurations again).

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\libnvvp
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\lib\x64
C:\Program Files\NVIDIA Corporation\NVSMI

            

6. Click OK three times in succession to save the settings.

Step 5: Check the graphics card driver and CUDA

1. On the operating system interface , use the shortcut win+R to open the Run window.

2. In the Run window, enter cmd and click OK.

            

3. In the cmd window, run the following command to check whether the graphics card driver is successfully installed.

nvidia-smi

            

Run the following command to check whether CUDA is successfully installed.

nvcc -V

The CUDA is successfully installed when the following screen shown below is returned.

            

Step 6: Install cuDNN

1. Go to the cuDNN Download page and click Archived cuDNN Releases to view more versions.

2. Locate your desired cuDNN version and download it.

            

3. Decompress the cuDNN package and copy the bin, include, and lib folders to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3.

            

The cuDNN installation is now complete.

Step 7: Install Anaconda deep learning library

We recommend that you install PyTorch and Tensorflow in a virtual environment created using Anaconda. Anaconda allows you to easily obtain and manage packages and centrally manage the environments. Anaconda includes more than 180 scientific packages and dependencies including conda and Python, and features ease of installation, high performance in Python and R language, and free community support.

1. Visit the Anaconda official website and download your desired version, for example, Anaconda3-2021.11-Windows-x86_64.

2. Double-click the installation package and install it as instructed. Please change the default installation path in the Choose Install Location step. The ProgramData folder in drive C (default installation path) is hidden. For easy management, we recommend that you install the library in another folder.

            

            

3. Click Install and complete the installation as instructed.

            

Step 8: Configure Anaconda deep learning library.

1. On the operating system interface, click in the lower left corner, and select Anaconda Prompt from the pop-up menu.

            

2. In the Anaconda Prompt command line window, run the following command to create a virtual environment.

conda create -n xxx_env python=3.9

Description

xxx_env is the environment name, and python=3.11 is the Python version. You can change them as needed.

The installation is successful when the following screen is displayed.

            

You can use the following command to enter or exit the virtual environment that you have created. In the virtual environment, you can install the package as needed.

#Activation command

conda activate xxx_env

#Deactivation command

conda deactivate

Step 9: Install PyTorch.

Visit PyTorch official website and use the installation code recommended in the official website. In this topic, CUDA version 11.3 has been installed. Run the following command in the created xxx_env virtual environment to install CUDA:

# CUDA 11.3

conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3

Step 10: Install Tensorflow.

1. Run the following command to install Tensorflow_gpu_2.6.0.

pip install tensorflow-gpu==2.6.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

2. Run the following command to install Keras.

pip install keras -i https://pypi.tuna.tsinghua.edu.cn/simple

The installation of the deep learning library is basically complete. You can follow the instructions in this topic to install more required packages, and use Jupyter Notebook or Spyder tool coming with Anaconda, or install a tool, for example, PyCharm, to start code learning.


Pv3ZRVGLyjqc