diff --git a/direct/checkpointer.py b/direct/checkpointer.py index 37ae5cb3..d0f1c13d 100644 --- a/direct/checkpointer.py +++ b/direct/checkpointer.py @@ -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]) diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index d5b587ab..00000000 --- a/docker/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Use the container (docker ≥ 19.03 required) - -To build: -```shell -cd docker/ -docker build -t direct:latest . -``` - -To run using all GPUs: -```shell -docker run --gpus all -it \ - --shm-size=24gb --volume=:/data --volume=:/output\ - --name=direct direct:latest /bin/bash -``` diff --git a/docker/README.rst b/docker/README.rst new file mode 100644 index 00000000..f252d35a --- /dev/null +++ b/docker/README.rst @@ -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=:/data --volume=:/output \ + --name=direct direct:latest /bin/bash diff --git a/installation.rst b/installation.rst index 33a4bfd9..e9ae05d7 100644 --- a/installation.rst +++ b/installation.rst @@ -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 `_ which install DIRECT with a few commands. While recommended due to the use of specific +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. +.. 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 `_. 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:: @@ -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 `_ 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::