diff --git a/docs/.gitlab-ci.yml b/docs/.gitlab-ci.yml
index 17b22ab256193b5c1e95e741ef32ed18c3676f4a..02cfc2d9b3514a9a2deeca1e36f673e79b029e12 100644
--- a/docs/.gitlab-ci.yml
+++ b/docs/.gitlab-ci.yml
@@ -7,8 +7,8 @@ build-documentation:
   image: sphinxdoc/sphinx:latest
 
   before_script:
-    - pip install sphinx_rtd_theme
-    - python $CI_PROJECT_DIR/docs/dump-openapi-spec.py
+    - pip install sphinx_rtd_theme fastapi
+    - python docs/dump-openapi-spec.py
   script:
     - sphinx-apidoc lso lso/app.py -o docs/source -d 2 -f
     - sphinx-build -b html docs/source docs/build