Skip to content

Commit

Permalink
Finish setup.py and READMEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tibuch committed Apr 6, 2021
1 parent fae3caf commit fb0d903
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],

Expand Down
2 changes: 1 addition & 1 deletion singularity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

0 comments on commit fb0d903

Please sign in to comment.