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
- Zombie processes may not be killed in WSL. Therefore, When you start using CUDA, e.g., training neural network, make sure that the code is runnable before using you CUDA. Otherwise, your graphic card(s) would not be available. This problem has not been resolved. You can follow and see the discussion: Unable to kill process within WSL or Task Manager · Issue #1021 · microsoft/WSL (github.com).
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
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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.