Docs | License | Installation | Model Zoo
Our library is developed using an Ubuntu 18.04 machine. We have not yet tested our library on other operating systems.
We provide three different ways of installing Imaginaire.
Note: sudo privilege is required.
git clone https://github.com/nvlabs/imaginaire
cd imaginaire
bash scripts/install.sh
bash scripts/test_training.sh
If installation is not successful, error message will be prompted.
We use NVIDIA docker image. We provide two ways to build the docker image.
- Build a target docker image
bash scripts/build_docker.sh 21.06
- Launch an interactive docker container and test the imaginaire repo.
cd scripts
bash start_local_docker.sh 21.06
cd ${IMAGINAIRE_ROOT}
bash scripts/test_training.sh
Set up the Conda environment and install packages with
conda env create --file scripts/requirements_conda.yaml
# install third-party libraries
export CUDA_VERSION=$(nvcc --version| grep -Po "(\d+\.)+\d+" | head -1)
CURRENT=$(pwd)
for p in correlation channelnorm resample2d bias_act upfirdn2d; do
cd imaginaire/third_party/${p};
rm -rf build dist *info;
python setup.py install;
cd ${CURRENT};
done
To activate the environment and test the repo:
conda activate imaginaire
bash scripts/test_training.sh
We follow the PEP8 style using flake8. To follow our practice, please do
pip install flake8
flake8 --install-hook git
git config --bool flake8.strict true
We set the maximum line length to 80. To avoid error messages due to different line length, create a file ~/.config/flake8
with the following content:
[flake8]
max-line-length = 200
- Install git for windows
- Install Microsoft C++ Build Tools
- Install Anaconda3
- Install CUDA11.1
- Install cudnn
- Open an anaconda prompt.
cd https://github.com/NVlabs/imaginaire
.\scripts\install.bat
Powershell
$env:PYTHONPATH = pwd
Get-ChildItem Env:PYTHONPATH