Repository: azavea/raster-vision

Issue:
Update docs on setting up RV outside of Docker image
The [setup docs](https://docs.rastervision.io/en/latest/setup.html) should be updated to describe the environment that is a prerequisite for installing RV and then using it. Showing how to do this on a Colab and/or the AWS Deep Learning AMI would be nice.


Discussion:

Resolving patch:
diff --git a/rastervision_pytorch_learner/rastervision/pytorch_learner/learner.py b/rastervision_pytorch_learner/rastervision/pytorch_learner/learner.py
--- a/rastervision_pytorch_learner/rastervision/pytorch_learner/learner.py
+++ b/rastervision_pytorch_learner/rastervision/pytorch_learner/learner.py
@@ -62,10 +62,15 @@ def log_system_details():
     # memory usage
     mem_stats = psutil.virtual_memory()._asdict()
     log.info(f'Total memory: {mem_stats["total"] / 2**30: .2f} GB')
+
     # disk usage
-    disk_stats = psutil.disk_usage('/opt/data')._asdict()
-    log.info(
-        f'Size of /opt/data volume: {disk_stats["total"] / 2**30: .2f} GB')
+    if os.path.isdir('/opt/data/'):
+        disk_stats = psutil.disk_usage('/opt/data')._asdict()
+        log.info(
+            f'Size of /opt/data volume: {disk_stats["total"] / 2**30: .2f} GB')
+    disk_stats = psutil.disk_usage('/')._asdict()
+    log.info(f'Size of / volume: {disk_stats["total"] / 2**30: .2f} GB')
+
     # python
     log.info(f'Python version: {sys.version}')
     # nvidia GPU


Test patch:
diff --git a/tests/pytorch_learner/utils/test_torch_hub.py b/tests/pytorch_learner/utils/test_torch_hub.py
--- a/tests/pytorch_learner/utils/test_torch_hub.py
+++ b/tests/pytorch_learner/utils/test_torch_hub.py
@@ -1,6 +1,5 @@
 from typing import Callable
 import unittest
-from tempfile import TemporaryDirectory
 from os.path import join, exists
 from os import makedirs
 
@@ -10,6 +9,7 @@
     _remove_dir, _repo_name_to_dir_name, _uri_to_dir_name,
     get_hubconf_dir_from_cfg, torch_hub_load_github, torch_hub_load_local,
     torch_hub_load_uri)
+from rastervision.pipeline.file_system import get_tmp_dir
 from rastervision.pytorch_learner import ExternalModuleConfig
 
 
@@ -21,7 +21,7 @@ def assertNoError(self, fn: Callable, msg: str = ''):
             self.fail(msg)
 
     def test_remove_dir(self):
-        with TemporaryDirectory(dir='/opt/data/tmp') as tmp_dir:
+        with get_tmp_dir() as tmp_dir:
             dir_to_be_removed = join(tmp_dir, 'dir_to_be_removed')
             makedirs(dir_to_be_removed, exist_ok=True)
             _remove_dir(dir_to_be_removed)
@@ -67,7 +67,7 @@ def test_get_hubconf_dir_from_cfg(self):
         self.assertEqual(dir_name, 'repo')
 
     def test_torch_hub_load(self):
-        with TemporaryDirectory(dir='/opt/data/tmp') as tmp_dir:
+        with get_tmp_dir() as tmp_dir:
             # github
             hubconf_dir = join(tmp_dir, 'focal_loss')
             loss = torch_hub_load_github(
@@ -105,7 +105,7 @@ def test_torch_hub_load(self):
             del loss
 
         # torch_hub_load_uri, zip
-        with TemporaryDirectory(dir='/opt/data/tmp') as tmp_dir:
+        with get_tmp_dir() as tmp_dir:
             hubconf_dir = join(tmp_dir, 'focal_loss')
             loss = torch_hub_load_uri(
                 uri=