From fb0d9035937ae6d88577b8c34f6f6f04fa99f58b Mon Sep 17 00:00:00 2001 From: tibuch Date: Tue, 6 Apr 2021 17:11:49 +0200 Subject: [PATCH] Finish setup.py and READMEs. --- README.md | 14 +++++++++----- setup.py | 2 -- singularity/README.md | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c4d0f1d..1e274a1 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ combining the FC-Loss, see Section 3.2 in the paper, and a conventional MSE-loss ## Installation -We use [fast-transformers]() as underlying transformer implementation. In our super-resolution experiments we use their +We use [fast-transformers](https://github.com/idiap/fast-transformers) as underlying transformer implementation. In our super-resolution experiments we use their `causal-linear` implementation, which uses custom CUDA code (prediction works without this custom code). This code is compiled during the installation of fast-transformers and it is necessary that CUDA and NVIDIA driver versions match. For our experiments we used CUDA 10.2 and NVIDIA driver 440.118.02. @@ -55,14 +55,18 @@ Next activate the new environment.: `conda activate fit` -Now we have to install the `astra-toolbox`: - -`conda install -c astra-toolbox/label/dev astra-toolbox` - Then we install PyTorch for CUDA 10.2: `conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch` +Followed by installing fast-transformers: + +`pip install --user pytorch-fast-transformers` + +Now we have to install the `astra-toolbox`: + +`conda install -c astra-toolbox/label/dev astra-toolbox` + And finally we install Fourier Image Transformer: `pip install fourier-image-transformer` diff --git a/setup.py b/setup.py index 3203e86..3bbb207 100644 --- a/setup.py +++ b/setup.py @@ -33,8 +33,6 @@ 'Topic :: Scientific/Engineering', 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], diff --git a/singularity/README.md b/singularity/README.md index a4dfa48..f2cc19d 100644 --- a/singularity/README.md +++ b/singularity/README.md @@ -7,7 +7,7 @@ Build Python package: `python setup.py bdist_wheel` Build singularity recipe: -`neurodocker generate singularity -b nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 -p apt --copy ./dist/fourier_image_transformer-0.2.0-py3-none-any.whl /fourier_image_transformer-0.2.0-py3-none-any.whl --miniconda create_env=fit conda_install='python=3.7 astra-toolbox pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch -c astra-toolbox/label/dev' pip_install='/fourier_image_transformer-0.2.0-py3-none-any.whl' activate=true --entrypoint "/neurodocker/startup.sh python" > singularity/v0.2.0.Singularity` +`neurodocker generate singularity -b nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 -p apt --copy ./dist/fourier_image_transformer-0.2.0-py3-none-any.whl /fourier_image_transformer-0.2.0-py3-none-any.whl --miniconda create_env=fit conda_install='python=3.6 astra-toolbox pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch -c astra-toolbox/label/dev' pip_install='/fourier_image_transformer-0.2.0-py3-none-any.whl' activate=true --entrypoint "/neurodocker/startup.sh python" > singularity/v0.2.0.Singularity` Build singularity container: `sudo singularity build singularity/fit_v0.2.0.simg singularity/v0.2.0.Singularity`