WIndows 11 安装 WSL2 到指定位置

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
reboot
wsl --update
https://wslstorestorage.blob.core.windows.net/wslblob/Ubuntu2204-221101.AppxBundle
解压
再次解压Ubuntu_2204.1.7.0_x64.appx
移动Ubuntu_2204.1.7.0_x64目录到目标位置
运行ubuntu.exe

ext4.vhdx即为WSL的虚拟磁盘

/mnt/f/wsl/Miniconda3-latest-Linux-x86_64.sh
Ubuntu 安装 Miniconda
cd ~ conda create -p miniconda3/envs/pytorch2 python=3.9 conda activate pytorch2 pip install /mnt/f/wsl/nvidia_cublas_cu11-11.11.3.6-py3-none-manylinux1_x86_64.whl pip install /mnt/f/wsl/nvidia_cudnn_cu11-8.7.0.84-py3-none-manylinux1_x86_64.whl pip install /mnt/f/wsl/nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl pip install /mnt/f/wsl/nvidia_curand_cu11-10.3.0.86-py3-none-manylinux1_x86_64.whl pip install /mnt/f/wsl/nvidia_cusolver_cu11-11.4.1.48-py3-none-manylinux1_x86_64.whl pip install /mnt/f/wsl/nvidia_cusparse_cu11-11.7.5.86-py3-none-manylinux1_x86_64.whl pip install /mnt/f/wsl/nvidia_nccl_cu11-2.20.5-py3-none-manylinux2014_x86_64.whl pip install /mnt/f/wsl/triton-2.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl pip install /mnt/f/wsl/torch-2.3.1+cu118-cp39-cp39-linux_x86_64.whl pip install /mnt/f/wsl/torchvision-0.18.1+cu118-cp39-cp39-linux_x86_64.whl pip install /mnt/f/wsl/torchaudio-2.3.1+cu118-cp39-cp39-linux_x86_64.whl pip install /mnt/f/wsl/opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl pip install /mnt/f/wsl/opencv_python_headless-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl cd /home/li/miniconda3/envs/pytorch2/lib/python3.9/site-packages/nvidia/cuda_nvrtc/lib ln -s libnvrtc.so.11.2 libnvrtc.so

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

20 − 9 =