Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion direct/checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
del checkpointables["model"]

self.model = self._remove_module_attribute(model)
for key in checkpointables:
for key in checkpointables.copy():
if re.match(model_regex, key):
checkpointables[key] = self._remove_module_attribute(checkpointables[key])

Expand Down
14 changes: 0 additions & 14 deletions docker/README.md

This file was deleted.

20 changes: 20 additions & 0 deletions docker/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Docker Installation
-------------------

Use the container (docker ≥ 19.03 required)
-------------------------------------------

To build:

.. code-block:: bash

cd docker/
docker build -t direct:latest .

To run using all GPUs:

.. code-block:: bash

docker run --gpus all -it \
--shm-size=24gb --volume=<source_to_data>:/data --volume=<source_to_results>:/output \
--name=direct direct:latest /bin/bash
18 changes: 10 additions & 8 deletions installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ Requirements
------------


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

Install using Docker
--------------------

We provide a `Dockerfile <docker>`_ which install DIRECT with a few commands. While recommended due to the use of specific
We provide a `Dockerfile <https://github.com/NKI-AI/direct/tree/main/docker>`_ 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.

.. include:: ../docker/README.rst

Install using ``conda``
---------------------------


#.
#.
First, install conda. Here is a guide on how to install conda on Linux if you don't already have it `here <https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html>`_. 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:

.. code-block::
Expand All @@ -33,20 +35,20 @@ Install using ``conda``

conda activate myenv

#.
#.
If you are using GPUs, cuda is required for the project to run. To install `PyTorch <https://pytorch.org/get-started/locally/>`_ with cuda run:

.. code-block::

pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
ppip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

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

.. code-block::

pip3 install torch==1.10.0+cpu torchvision==0.11.1+cpu torchaudio==0.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu

#.
#.
Clone the repository using ``git clone`` and navigate to ``direct/direct/`` and run

.. code-block::
Expand Down