Skip to content

Installation Instructions

neosr-project edited this page Oct 18, 2024 · 8 revisions

NVIDIA Drivers

Install the latest proprietary NVIDIA drivers. The minimum supported CUDA version on neosr will always be the same as Pytorch's latest release.

Windows

Download and install from official nvidia website.

Linux-based systems

It is recommended that you install the proprietary drivers by adding the official repository to your package manager. Follow the instructions on NVIDIA website. The package cuda-toolkit is recommended as well. The open-dkms versions of the drivers have not been tested, but they should work as well. If you have issues with open-dkms, use the older dkms instead. Verify the CUDA version by using nvidia-smi on command line.

Note

Proprietary drivers are required, since we need CUDA.


Python and Git

Install Python and Git. neosr supports Python 3.12, other versions are not recommended or supported.

Windows

Use winget through PowerShell:

winget install Python.Python.3.12 Git.Git

Linux-based systems

Use your package manager. After installing, make sure your default python PATH leads to version 3.12. You can ensure that by using update-alternatives:

update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
update-alternatives --config python

Poetry:

Install Poetry. This step is OS-independent:

pip install pipx
pipx install poetry
pipx ensurepath

Verify the installation by checking poetry version:

poetry --version

Clone and Install neosr

Clone the repository and enter the dir:

git clone https://github.com/neosr-project/neosr
cd neosr

Install neosr through poetry:

poetry install --sync

Poetry will install all dependencies based on the pyproject and poetry.lock, making the env not only isolated but also reproducible.

Note

You should use poetry shell on the neosr directory to enter the env before training.


Updating neosr

Use git and poetry to update neosr:

git pull
git fetch
poetry install --sync

Uninstalling

If you only use poetry for neosr, you can delete all envs at once and deleting caches:

poetry env remove --all
poetry cache clear . --all

You can then delete the neosr directory and it will be fully uninstalled.