diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 16bbf56c9d7ba019719b67b601c6a0475406ca46..3aa65f3a78429409f37aafb23ce08672cfa5785c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,7 +18,17 @@ build_html:
   dependencies:
     - build_js
   image: python:3
+  variables:
+    PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+  cache:
+    paths:
+      - .cache/pip
+      - venv/
+  before_script:
+    - python3 -m venv --copies venv
+    - source venv/bin/activate
   script:
+    - pip install -U pip wheel setuptools
     - pip install -r requirements.txt
     - make html
   artifacts: