microsoft / vscode-ai-toolkit

MIT License
1.22k stars 65 forks source link

Can't save project inside WSL instance #28

Open elsaco opened 11 months ago

elsaco commented 11 months ago

The project is saved in C:\home\<username>\<project_name> instead.

Step 3 fails to generate project:

Debug: generate-project[0]
   09:24:15.55 0 RunProcess fileName:wsl arguments:[ --exec bash \home\elsaco\ai\phi-2_test\setup\first_time_setup.sh] elevated:False
Error: generate-project[0]
   09:24:15.66 0 RunProcess error:bash: \home\elsaco\ai\phi-2_test\setup\first_time_setup.sh: No such file or directory
Debug: generate-project[0]

VSCode complains that This workspace is on the Windows file system (/mnt/). For best performance, we recommend moving the workspace to the Linux file system (~/home)


Quick workaround: before finalizing step 3 manually move the project folder from C:\home to ~home in WSL instance.

venturaEffect commented 11 months ago

What do you mjean with WSL instance?

Looking everywhere, there is nothing of open remote connection to default WSL instance.

I mean, I appreciate the help. But more I try, more everything changes, weird bugs, not very transparent explanations.

Something it looks pretty straight forward it just gets strangely over complicated.

eric-vanartsdalen commented 10 months ago

Windows AI Studio – following walkthrough… (which shows this #28 amd #18) Windows has latest Nvidia Graphics driver installed.

  1. Installed Ubuntu from Windows Store - Removed/Reinstalled Ubuntu 22.04.3 - launched to set user and pwd for Ubuntu instance - updated with apt update and upgrade
  2. Setup WSL to point to Ubuntu as default system.

    wsl -l -v NAME STATE VERSION

    • Ubuntu-22.04 Running 2 docker-desktop-data Stopped 2 docker-desktop Stopped 2
  3. Installed VSCode on Windows Added Extensions - WSL and Windows AI Studio (Pre-Release)
  4. Clicked the WINDOWS AI STUDIO extension on VSCode – (seems to auto-connect to WSL for the Ubuntu wsl instance.) and then shows a VALIDATE MACHINE ENVIRONMENT… -missing Conda & CUDA libraries. Click ‘Setup WSL Environment’ button…

image

  1. Setup Completes. (Conda and CUDA libraries are added to the Ubuntu instance.)

    • looks like Miniconda and CUDA 11 supporting is installed within WSL Ubuntu environment. The default Windows AI Studio - Wizard page shows in VSCode image
  2. Selected “Model Fine-tuning”… NOTE: Because VSCode is currently configured for WSL and appears to be in the Ubuntu context – you cannot specify an Windows directory pathway. If you specify a directory by navigating to the WSL mnt correspondingly… it seems to use the Windows file-system delimiter instead of the Linux system delimter for the Project folder pathway. (Note: This could potentially cause issues if the details are saved in configuration files.)

image

A) Set a Project folder name (SamplePHI2), and navigated to a shared directory (/mnt/c/Users/{ user }/source/repos/AI) and Selected Model (Microsoft/phi-2)

B) Step 2 Configure the model

Leave defaults… image

NOTE: The Conda environment does not get created. I needed to manually (a) Open a terminal, and (b) Execute the first_time_setup.sh bash script in the setup. Select “Generate Project”

Some files should correspond with the hugging face model as published. https://huggingface.co/microsoft/phi-2/tree/main THIS CAN TAKE SOME TIME AS DOWNLOADING OF MODEL FILES CAN BE LARGE…

image

C) Once download occurs, there should be a new button, “Relaunch Windows in Workspace”. Click the button

image

D) Once it relaunches, Trust the Project.

image

GET Error Open Workspace.

image

 I changed to point to the correct folder path: /mnt/c/mnt/c/Users/{ user }/source/repos/AI/SamplePHI2 -Get the Trust dialog…

image

  1. Once VScode is open with a proper folder -open the README -open the Terminal

Follow the README image

Noting this notification:

image

acube3 commented 10 months ago

Please make sure to disconnect from WSL while you create the workspace/project. Once the project is created then you can open the workspace in WSL. While creating the project make sure that the bottom left of the VS Code window shows that it is disconnected from WSL. e.g. image