Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.4 kB
2
Indexable
Never
# apparently, this mitigates issues with multiple cuda environments. Of course, you will always have 12.4 installed on your PC, this is for any version you prefer

# then export to path the needed info so it works for nvcc --version
export CUDA_HOME=/usr/local/cuda-11.8
export PATH=/usr/local/cuda-11.8/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH



conda activate blender_env
conda env list
# find path from the above comand

# create activation setup for environment
mkdir -p ~/miniconda3/envs/blender_env/etc/conda/activate.d

# create deactivation setup for environment
mkdir -p ~/miniconda3/envs/blender_env/etc/conda/deactivate.d

# edit export vars
nano ~/miniconda3/envs/blender_env/etc/conda/activate.d/env_vars.sh

# #!/bin/sh
# export CUDA_HOME=/usr/local/cuda-11.8
# export PATH=/usr/local/cuda-11.8/bin:$PATH
# export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH

nano ~/miniconda3/envs/blender_env/etc/conda/deactivate.d/env_vars.sh

# #!/bin/sh
# unset CUDA_HOME
# export PATH=$(echo $PATH | sed -e 's|/usr/local/cuda-11.8/bin:||')
# export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed -e 's|/usr/local/cuda-11.8/lib64:||')

# make them executable
chmod +x ~/miniconda3/envs/blender_env/etc/conda/activate.d/env_vars.sh
chmod +x ~/miniconda3/envs/blender_env/etc/conda/deactivate.d/env_vars.sh
Leave a Comment