Set up a Cerebras virtual environment#

Before you launch your first job in the Cerebras Wafer-Scale cluster, create a Python virtual environment to install Cerebras’s software dependencies. You need to create the virtual environment only once for every release.

Prerequisites#

Python version#

Use Python 3.8 to set up your environment.

Create a Cerebras virtual environment#

1. Create your Python virtual environment. It can also be pre-configured by a system administrator and could have a different name. For demonstration purposes, let’s create a virtual environment named venv_cerebras_pt using the following command:

/opt/python3.8/bin/python3.8 -m venv venv_cerebras_pt

2. Install the cerebras_pytorch package using the following commands:

source venv_cerebras_pt/bin/activate

Note that now you should be in the (venv_cerebras_pt) environment.

pip install --upgrade pip
pip install cerebras_pytorch==2.1.1

Validate the set up#

To ensure that your Cerebras PyTorch python package was installed correctly in your environment, we offer you a utility called cerebras_install_check.

Use this utility to verify the deployed versions of the appliance software are compatible by issuing the following command:

source venv_cerebras_pt/bin/activate

Note that now you should be in the (venv_cerebras_pt) environment.

cerebras_install_check