DEV Community

Wriju's Blog
Wriju's Blog

Posted on

Setting Up a Developer Machine for Generative AI Development

In this blog post, we will walk through the steps to set up a developer machine for Generative AI development. This setup includes the Windows Subsystem for Linux (WSL) on Windows 11, Python in WSL Ubuntu, Visual Studio Code on Windows 11, and several necessary extensions. Let's get started!

Set Up Windows Subsystem for Linux in Windows 11

The first step is to set up the Windows Subsystem for Linux (WSL) in Windows 11. This allows you to run a Linux environment directly on Windows, without the overhead of a traditional virtual machine or dual-boot setup.

Install Python in WSL Ubuntu

Once you have WSL set up, the next step is to install Python in your WSL Ubuntu environment. You can do this by running the following command in your WSL terminal:

sudo apt install python3 python3-pip

Install Visual Studio Code in Windows 11

Visual Studio Code (VS Code) is a popular code editor that we'll be using for our development. You can download and install VS Code from the official website.

Install Python Extension in Visual Studio Code

After installing VS Code, you'll need to install the Python extension. This extension provides rich support for Python in VS Code. You can install it from the Extensions view in VS Code.

Install Connect to WSL Extension in Visual Studio Code

The "Remote - WSL" extension in VS Code lets you use the Windows Subsystem for Linux (WSL) as your full-time development environment right from VS Code. You can install it from the Extensions view in VS Code.

Connect Visual Studio Code with WSL

To connect VS Code with WSL, you can use the "Remote-WSL: New Window" command from the Command Palette (F1) in VS Code. This will open a new VS Code window connected to WSL.

Install pip in WSL Ubuntu

pip is a package manager for Python. You can use it to install Python packages. To install pip in your WSL Ubuntu environment, you can run the following command in your WSL terminal:

sudo apt install python3-pip

Install OpenAI SDK

The OpenAI SDK is a set of tools and libraries for working with generative AI models. You can usually install Python libraries using pip. Please refer to the official OpenAI SDK documentation for the most accurate information.

Set Up Python Environment

Finally, you'll want to set up a Python environment for your project. This can help keep your project's dependencies isolated from other projects. Here's a sample command on how to set up a Python environment:

python3 -m venv myenv

This command creates a new Python environment in a folder named myenv. You can replace myenv with your preferred environment name.

That's it! You now have a developer machine set up for Generative AI development.

Happy coding!

Top comments (0)