Skip to main content
If you’re using a Cerebras Wafer-Scale Cluster running in appliance mode, see Running SDK on a Wafer-Scale Cluster.

Request Access

Request access to the Cerebras SDK Singularity container at cerebras.ai/developers/sdk-request. You can also find a repository of example programs on GitHub. Your download includes a tarball (Cerebras-SDK-2.10.0-{build_id}.tar.gz) containing the SDK software and a sha256sum.txt file for verifying the download integrity.

Prerequisites

Before you begin, make sure your system has the following:

Install the SDK

If you’re on an Apple Silicon Mac, see Apple Silicon Mac installation instead.
1

Verify the download (optional)

In the directory where you downloaded the tarball, run the checksum verification:
cd /my/install/location
sha256sum --check sha256sum.txt
If the output shows OK, the file is intact.
2

Extract the SDK

Set environment variables for your install location and tarball path. Both should be absolute paths:
SDK_INSTALL_LOCATION=/my/install/location
SDK_INSTALL_PATH=$SDK_INSTALL_LOCATION/cs_sdk
SDK_TAR_PATH=/path/to/Cerebras-SDK-2.10.0-{build_id}.tar.gz
Create the install directory and extract the tarball:
mkdir -p $SDK_INSTALL_PATH
tar -C $SDK_INSTALL_PATH -xvf $SDK_TAR_PATH
After extraction, your $SDK_INSTALL_PATH directory should contain:
FileDescription
sdk-cbcore-{build_id}.sifThe SDK container image (~3 GB)
cslcCSL compiler script
cs_pythonScript for running Python code within the container’s Python environment
csdbHardware debug tools script
cs_readelfCerebras alternative to readelf
sdk_debug_shellSimulation debug tools, including the smoke test and SDK GUI
csl-extras-{build_id}.tar.gzExample programs, tutorials, and extras (including CSL syntax highlighters for Vim and VS Code)
cerebras-software-eula.pdfEnd User License Agreement
sdk-gui-LICENSE.txtLicense for the GUI tool
3

Add the SDK to your PATH

Add the SDK to your current session and persist it across future sessions:
export PATH=$SDK_INSTALL_PATH:$PATH
echo 'export PATH='$SDK_INSTALL_PATH':$PATH' >> ~/.bashrc
4

Run the smoke test

Extract the examples and run the smoke test to verify that everything compiles and runs correctly:
cd $SDK_INSTALL_PATH
tar -xzvf csl-extras-{build_id}.tar.gz
sdk_debug_shell smoke csl-extras-{build_id}
A successful test ends with:
SUCCESS!
PASSED
SMOKE CHECK COMPLETED SUCCESSFULLY
To speed up the smoke test and reduce disk usage, set SINGULARITYENV_CSL_SUPPRESS_SIMFAB_TRACE=1 before running it. This skips generating simfab_traces used by the SDK GUI. Unset this variable before running examples you plan to visualize in the GUI.
5

Verify the SDK Debug GUI (optional)

To confirm the GUI works, run the gemm-collectives_2d example:
cd $SDK_INSTALL_PATH/csl-extras-{build_id}/csl_examples/benchmarks/gemm_collectives_2d
./commands.sh
Then launch the GUI:
sdk_debug_shell visualize
This outputs one or more URLs. Open one in your browser to view the GUI:
Click this link to open URL:  http://<url>:8000/sdk-gui?session_id=...
After selecting a PE, you should see a visualization like this:
SDK Debug GUI showing a selected PE

Apple Silicon Mac installation

On Apple Silicon Macs, the SDK runs inside a Linux virtual machine powered by Lima. You can use either Rosetta (recommended for performance) or QEMU for x86 emulation. Choose your approach below, then continue with the shared setup steps.

Create the VM and Run the SDK

After completing either option above:
1

Create the virtual machine

limactl start ./config.yml --name cs_sdk
2

Start the VM and add the SDK to your PATH

Extract the SDK tarball somewhere under your Mac’s home directory, then start a shell in the VM:
# Start a shell inside the VM
limactl shell cs_sdk

# Add the SDK to your PATH (use the absolute Mac path — the home directory
# inside the VM is different from your Mac's home directory)
export PATH=/Users/your-username/path/to/sdk:$PATH
From here, you can run SDK examples within the VM. Lima automatically forwards ports, so if you launch the SDK GUI inside the VM, you can access it in your Mac’s browser at 127.0.0.1:8000/sdk-gui.

Using Additional Python Packages

The cs_python script runs host code from the Python environment inside the container. To add packages to this environment, save the following helper script as sdk_install_python_package.sh:
#!/bin/bash
 
py_path=$(realpath $1)
package_name=$2
SINGULARITYENV_PYTHONPATH="$(realpath $py_path)"
cs_python -c "
import subprocess
import sys
package='$2'
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--target=$py_path', package])
"
echo -e "Please do\nexport SINGULARITYENV_PYTHONPATH=\"$SINGULARITYENV_PYTHONPATH\"\nbefore using cs_python"
Then install a package into a local directory:
mkdir MY_LOCAL_PY_PATH
bash /path/to/sdk_install_python_package.sh ./MY_LOCAL_PY_PATH <package-name>
Before running cs_python, set the environment variable so it can find your installed packages:
export SINGULARITYENV_PYTHONPATH=$(realpath $MY_LOCAL_PY_PATH)