diff --git a/bob/devtools/build.py b/bob/devtools/build.py
index 59aa728f96ae6fb123e5f938fc419e9c7fa038d5..93ca35625668ee9f20bbf71f7693096878cdcd49 100644
--- a/bob/devtools/build.py
+++ b/bob/devtools/build.py
@@ -533,6 +533,7 @@ def git_clean_build(runner, verbose):
     # glob wild card entries we'd like to keep
     exclude_from_cleanup = [
         "miniconda.sh",  # the installer, cached
+        "torch",  # eventual pytorch caches
         "sphinx",  # build artifact -- documentation
         "coverage.xml",  # build artifact -- coverage report
     ]
diff --git a/bob/devtools/data/gitlab-ci/docs.yaml b/bob/devtools/data/gitlab-ci/docs.yaml
index c201aafd3e4e7d156ee864a27e7c9ce0984999fc..3a1111cce4e840e4b129986b68595c9561686a24 100644
--- a/bob/devtools/data/gitlab-ci/docs.yaml
+++ b/bob/devtools/data/gitlab-ci/docs.yaml
@@ -7,6 +7,7 @@ variables:
   PYTHONUNBUFFERED: "1"
   CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"
   BOOTSTRAP: "https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/bootstrap.py"
+  TORCH_HOME: "${CI_PROJECT_DIR}/torch"
 
 
 # Definition of our build pipeline order
@@ -30,6 +31,7 @@ stages:
   cache:
     paths:
       - miniconda.sh
+      - torch
 
 
 # Build target
diff --git a/bob/devtools/data/gitlab-ci/nightlies.yaml b/bob/devtools/data/gitlab-ci/nightlies.yaml
index 5ab536c9865d3bd65dd7f5b69aedae3e4faf5bf8..2e1f7841d17b9f53790937cf6b5d3e8c395a9788 100644
--- a/bob/devtools/data/gitlab-ci/nightlies.yaml
+++ b/bob/devtools/data/gitlab-ci/nightlies.yaml
@@ -6,6 +6,7 @@ variables:
   PYTHONUNBUFFERED: "1"
   CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"
   BOOTSTRAP: "https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/bootstrap.py"
+  TORCH_HOME: "${CI_PROJECT_DIR}/torch"
 
 
 # Definition of our build pipeline order
@@ -26,6 +27,7 @@ stages:
   cache:
     paths:
       - miniconda.sh
+      - torch
 
 
 # Build targets
diff --git a/bob/devtools/data/gitlab-ci/single-package.yaml b/bob/devtools/data/gitlab-ci/single-package.yaml
index eee41cefe6b574dcfb847a6a56ce51de735052f4..f7f71b989bc1b61d44e04eea1543c1655f79b96c 100644
--- a/bob/devtools/data/gitlab-ci/single-package.yaml
+++ b/bob/devtools/data/gitlab-ci/single-package.yaml
@@ -7,6 +7,7 @@ variables:
   PYTHONUNBUFFERED: "1"
   CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"
   BOOTSTRAP: "https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/bootstrap.py"
+  TORCH_HOME: "${CI_PROJECT_DIR}/torch"
 
 
 # Definition of our build pipeline order
@@ -28,6 +29,7 @@ stages:
   cache:
     paths:
       - miniconda.sh
+      - torch
 
 
 # Build targets
@@ -114,6 +116,7 @@ build_linux_37:
   cache:
     paths:
       - miniconda.sh
+      - torch
 
 
 .test_linux_template: