/ensure-cuda

A small utility to ensure that one's LD_LIBRARY_PATH is set correctly at runtime.

Primary LanguageDockerfile

ensure-cuda

A small utility to ensure that one's LD_LIBRARY_PATH is set correctly at runtime when using cuda + conda environments.

Made with ❤️ by Eric J. Ma (@ericmjl).

Usage

pip install ensure-cuda

Then, in a Python environment:

import ensure_cuda

If you want to sanity-check your LD_LIBRARY_PATH:

import os
os.getenv("LD_LIBRARY_PATH")
# or else:
assert os.getenv("CONDA_PATH") in os.getenv("LD_LIBRARY_PATH")

Get started for development

To get started:

git clone git@github.com:ericmjl/ensure-cuda
cd ensure-cuda
mamba env update -f environment.yml
conda activate ensure-cuda
python -m pip install -e .