diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f23b0cf181..43775983f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -157,15 +157,15 @@ cd $CUOPT_HOME Please install conda if you don't have it already. You can install [miniforge](https://conda-forge.org/download/) or [miniconda](https://www.anaconda.com/docs/getting-started/miniconda/install#linux) -**Note:** We recommend using [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) as the package manager for the conda environment. Mamba is faster and more efficient than conda. And it's the default package manager for miniforge. If you are using mamba just replace `conda` with `mamba` in the following commands. +**Note:** We recommend using [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) as the package manager for the conda environment. Mamba is faster and more efficient than conda. It's already included if you installed miniforge above; if you installed miniconda instead, it doesn't come bundled — follow the mamba link to install it into your base environment. The commands below use `mamba`; if you don't have it installed, replace `mamba` with `conda`. ```bash # create the conda environment (assuming in base `cuopt` directory) # note: cuOpt currently doesn't support `channel_priority: strict`; # use `channel_priority: flexible` instead -conda env create -p ./.cuopt_env --file conda/environments/all_cuda-133_arch-$(uname -m).yaml +mamba env create -p ./.cuopt_env --file conda/environments/all_cuda-133_arch-$(uname -m).yaml # activate the environment -conda activate ./.cuopt_env +mamba activate ./.cuopt_env # or: conda activate ./.cuopt_env ``` - **Note**: the conda environment files are updated frequently, so the diff --git a/skills/cuopt-developer/SKILL.md b/skills/cuopt-developer/SKILL.md index 56a97c6585..ff1738bc5f 100644 --- a/skills/cuopt-developer/SKILL.md +++ b/skills/cuopt-developer/SKILL.md @@ -180,12 +180,12 @@ cuopt/ Skipping any of these surfaces as confusing runtime errors later. Run them in order: 1. **Check CUDA driver compatibility.** Run `nvidia-smi` and read the *CUDA Version* in the top-right corner — that's the maximum CUDA your driver supports. Pick a conda env file from `conda/environments/all_cuda-_arch-.yaml` whose CUDA major version is **≤** that. A mismatch builds successfully but fails at runtime inside RMM with `cudaMallocAsync not supported with this CUDA driver/runtime version` — verify this *before* the build, not after. -2. **Create and activate the conda env** before *any* build, test, or `pre-commit` command — this is allowed and expected (see [Refusal Rules](#refusal-rules--read-first)). Use a **local prefix env** (`./.cuopt_env`) per [CONTRIBUTING.md](../../CONTRIBUTING.md), with the env file you picked in step 1 (swap `conda`→`mamba` if available): +2. **Create and activate the conda env** before *any* build, test, or `pre-commit` command — this is allowed and expected (see [Refusal Rules](#refusal-rules--read-first)). Use a **local prefix env** (`./.cuopt_env`) per [CONTRIBUTING.md](../../CONTRIBUTING.md), with the env file you picked in step 1 (`mamba` is recommended and faster; swap in `conda` if `mamba` isn't available): ```bash - conda env create -p ./.cuopt_env --file conda/environments/all_cuda-_arch-$(uname -m).yaml - conda activate ./.cuopt_env + mamba env create -p ./.cuopt_env --file conda/environments/all_cuda-_arch-$(uname -m).yaml + mamba activate ./.cuopt_env # or: conda activate ./.cuopt_env ``` - Tests link against libraries compiled inside that env; a fresh shell without `conda activate ./.cuopt_env` hits cryptic linker errors. + Tests link against libraries compiled inside that env; a fresh shell without activating it hits cryptic linker errors. 3. **Set `PARALLEL_LEVEL`** if RAM is constrained — see [references/build_and_test.md](references/build_and_test.md). The default `$(nproc)` can OOM mid-build because CUDA compilation needs ~4–8 GB per job. 4. **For tests, fetch datasets first.** cuOpt tests need MPS files not in the repo — follow the dataset download steps in [CONTRIBUTING.md](../../CONTRIBUTING.md) ("Building for development" section) and export `RAPIDS_DATASET_ROOT_DIR`.