Skip to content

Latest commit

 

History

History
70 lines (40 loc) · 2.05 KB

installation.rst

File metadata and controls

70 lines (40 loc) · 2.05 KB

Installation

Requirements

  • CUDA ≥ 10.2 supported GPU.
  • Linux with Python ≥ 3.8
  • PyTorch ≥ 1.6

Install using Docker

We provide a Dockerfile which install DIRECT with a few commands. While recommended due to the use of specific pytorch features, DIRECT should also work in a virtual environment.

Install using conda

  1. First, install conda. Here is a guide on how to install conda on Linux if you don't already have it here. If you downloaded conda for the first time it is possible that you will need to restart your machine. Once you have conda, create a python 3.9 conda environment:

    conda create -n myenv python=3.9
    

    Then, activate the virtual environment myenv you created where you will install the software:

    conda activate myenv
    
  2. If you are using GPUs, cuda is required for the project to run. To install PyTorch with cuda run:

    pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
    

    otherwise, install the latest PyTorch CPU version (not recommended):

    pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
    
  3. Clone the repository using git clone and navigate to direct/direct/ and run

    python3 setup.py install
    

    or

    python3 -m pip install -e ".[dev]"
    

    This will install direct as a python module.

Common Installation Issues

If you met issues using DIRECT, please first update the repository to the latest version, and rebuild the docker. When this does not work, create a GitHub issue so we can see whether this is a bug, or an installation problem.