Skip to content

Argonne Leadership Computing Facility

Customizing Environments

Using virtual Python environments

To make a PyTorch virtual environment for Cerebras

mkdir ~/R_2.2.0
cd ~/R_2.2.0
# Note: "deactivate" does not actually work in scripts.
rm -r venv_cerebras_pt
/software/cerebras/python3.8/bin/python3.8 -m venv venv_cerebras_pt
source venv_cerebras_pt/bin/activate
pip install --upgrade pip
pip install cerebras_pytorch==2.2.0
# Patch to fix a mount problem; a future release will not need this.
cp /software/cerebras/venvs/R_2_2.0_patch/ ~/R_2.2.0/venv_cerebras_pt/lib/python3.8/site-packages/cerebras/appliance/

Activation and deactivation

To activate a virtual environments

source ~/R_2.2.0/venv_cerebras_pt/bin/activate

To deactivate a virtual environment,