An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11

The Linux OS with a Bash shell provides a familiar and highly controllable workflow for programmers. However, we always need the Windows system to offer other common software for our daily work and amusement activities. To seamlessly transfer between t…


This content originally appeared on Level Up Coding - Medium and was authored by Xinzhe Li

The Linux OS with a Bash shell provides a familiar and highly controllable workflow for programmers. However, we always need the Windows system to offer other common software for our daily work and amusement activities. To seamlessly transfer between the Linux/Bash interface and Windows interface, we provide two options in this post.

This is a practical guide. Therefore, I would explain each command for an in-depth understanding and note the caveats (I would assume that readers are qualified programmers who are familiar with common bash commands). In addition, since the code snippets are embedded in this post, the change would reflect on this post to ensure that it would not be outdated every time I update the original code snippets.

Again, this is a practical guide. I would list the pros and cons of each solution at the beginning so that you can choose the one fitting into you case and go that section. I only list the pros of each solution, since the pros of one solution would become the cons of the other. For the second solution, although there are many cloud providers offering Virtual Machines, I find that Azure is mostly compatible with some common Microsoft software on Windows. For example, you can get almost native experience of VS code with the extensions and high-speed network.

WSL2

  • provides a totally native experience (as far as I have experienced)
  • can be used offline without Internet
  • has no network delay

Azure Virtual Machine

  • can enable multiple GPUs
  • provides a complete Python environment, even common data science libraries and machine learning frameworks

Windows Subsystem for Linux

Microsoft now uses Windows Subsystem for Linux (WSL). More amazingly deep learning practitioners, WSL2 now supports Nvidia GPUs with CUDA since the underlying Linux Kernel is now based on Microsoft Hyper-V.

However, there are some caveats if you only follows the official guidelines from Microsoft and Nvidia. Therefore, this article provides a very concise guideline to avoid these caveats.

One More Caveat In Use

Another Solution: Using Azure Linux Virtual Machine on Windows

The script performs automated creation and setup of Data Science Virtual Machine. I also elaborate the details for each command. So read it once you use it.

(Optional) Setup the Python Environment on Linux

This snippet is not necessary if you use the Azure DSVM, but would be helpful if you use WSL2, where you need setup the environment by yourself.


An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11 was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Xinzhe Li


Print Share Comment Cite Upload Translate Updates
APA

Xinzhe Li | Sciencx (2022-06-13T22:21:11+00:00) An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11. Retrieved from https://www.scien.cx/2022/06/13/an-ultimate-guide-to-setup-a-cuda-enabled-linux-system-on-windows11/

MLA
" » An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11." Xinzhe Li | Sciencx - Monday June 13, 2022, https://www.scien.cx/2022/06/13/an-ultimate-guide-to-setup-a-cuda-enabled-linux-system-on-windows11/
HARVARD
Xinzhe Li | Sciencx Monday June 13, 2022 » An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11., viewed ,<https://www.scien.cx/2022/06/13/an-ultimate-guide-to-setup-a-cuda-enabled-linux-system-on-windows11/>
VANCOUVER
Xinzhe Li | Sciencx - » An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/06/13/an-ultimate-guide-to-setup-a-cuda-enabled-linux-system-on-windows11/
CHICAGO
" » An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11." Xinzhe Li | Sciencx - Accessed . https://www.scien.cx/2022/06/13/an-ultimate-guide-to-setup-a-cuda-enabled-linux-system-on-windows11/
IEEE
" » An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11." Xinzhe Li | Sciencx [Online]. Available: https://www.scien.cx/2022/06/13/an-ultimate-guide-to-setup-a-cuda-enabled-linux-system-on-windows11/. [Accessed: ]
rf:citation
» An Ultimate Guide to Setup a CUDA-enabled Linux System on Windows11 | Xinzhe Li | Sciencx | https://www.scien.cx/2022/06/13/an-ultimate-guide-to-setup-a-cuda-enabled-linux-system-on-windows11/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.