install_utils#

Utilities module with minimal dependencies (standard library only) for installation

class CondaParser[source]#

Bases: object

static get_conda_pkg_info(pkg_name, channels, version_pattern)[source]#
static pkg_to_v_string(pkg)[source]#
class EnvFileManager(cfg_path, dest_path)[source]#

Bases: object

add_dependency(package_name, pkg_version='')[source]#
get_env_name()[source]#
get_package_version(package_name)[source]#
patch_env_var(var_name, var_val)[source]#
patch_environment_package_line(package_name, pkg_version='', comparison_operator='=')[source]#

Patch the yaml environment file

Parameters:
  • package_name

  • pkg_version

Returns

remove_dependency(package_name)[source]#
write()[source]#
property python_version#
class PytorchVersionManager(cfg_path, python_version, pytorch_version='1.11')[source]#

Bases: object

static assert_cuda()[source]#
static check_pytorch()[source]#
get_best_match_cuda_version(versions)[source]#
get_pytorch_cpu_info()[source]#
get_pytorch_gpu_info()[source]#
get_toolkit_info()[source]#
get_toolkit_versions()[source]#
match_pytorch_to_cuda()[source]#
match_pytorch_to_toolkit()[source]#
toolkit_dep_to_version(dep_str)[source]#
toolkit_version_from_torch_pkg(pkg)[source]#
torch_build_to_cuda_version(build)[source]#
property cuda_major#
property cuda_version#
property pytorch_info#
patch_env(cfg_path, dest_path, use_cuda_torch=True, use_spyder=False, tmp_dir=None)[source]#