Windows Server (mentioned in the link) probably isn't what you actually want for this. Windows Server is a highly specialized version of Windows designed for corporate IT departments who are hosting on-premise services like Microsoft Exchange, Active Directory, enterprise-grade virtualization or web hosting, etc.
Because of its specialization, Windows Server didn't even originally support WSL. Even now, I'm not sure if the latest WSL releases run on it. Regardless, let's consider Windows Server a red-herring for your particular ask.
The laptop in question has a GPU so is terrible for carrying around but I want to use the GPU to train neural networks, including Unity ML-Agents for Unity running on Windows 11, from my other no-GPU laptop.
The first challenge you will face is the same as with any service that you want to access remotely -- The network route to your GPU-laptop. Of course, most computers aren't (and shouldn't be) directly accessible from the public Internet.
To access Ubuntu on WSL from a remote system, you'll need two things:
- A network path to the GPU-laptop system
- A way to run commands on that system once connected.
The first is typically going to be the biggest hurdle, especially securely. And it's going to depend on how your desktop accesses the Internet in the first place. If you have VPN access to the normal network the laptop resides in, then that's one possibility, and likely more secure than most other methods.
Another solution, which I saw in another answer to a WSL question at one point, is ngrok. I've never tried this one myself. Note the ngrok RDP help (RDP covered below) - They recommend that you only give access to specific network ranges so that you limit the potential security exposure. It should also go without saying that you'll want a VERY strong password in place if you are opening up your system to remote access from the Internet-at-large.
Once you can at least reach the GPU-system from the other laptop, you'll need to decide on a protocol to use for remote access. The two methods discussed in that article still apply. However, some of the information is a bit out-of-date:
Remote Desktop: My preferred solution at the moment is Remote Desktop (RDP). As long as you have Windows Pro, Windows Education, or higher (in other words, not Windows Home), you can enable it through the System -> Remote Desktop settings. You can then connect to it from other Windows systems using the Remote Desktop Connection application. Other operating systems have clients as well.
The advantage here is that you can access the system whether or not your user is logged into the physical desktop. Other remote desktop solutions exist as well, such as VNC.
SSH: The other solution is to SSH into Ubuntu running under WSL. This honestly used to be easier in earlier versions of WSL. However, the shift to running WSL as an application means that you can't start WSL over SSH. This means that you must have already logged into the GPU laptop's desktop and started Ubuntu with the SSH service running. If the system reboots, for instance, and Ubuntu is not running, then you won't be able to use SSH.
To configure SSH, see my recent answer on that topic here.