diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b8ae6e6caf5b75bbe04134c680437b92aa84a716..56bb95c746e5bf0a1defdf941722f50083820d4a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,7 +21,7 @@ doc:
     script:
         - export LC_ALL=$(locale -a | grep en_US)
         - export LANG=$(locale -a | grep en_US)
-        - python3 setup.py install
+        - pip3 install -e .[doc]
         - python3 setup.py build_sphinx
     artifacts:
         paths:
diff --git a/docker/Dockerfile_ubuntu_18.04 b/docker/Dockerfile_ubuntu_18.04
index 1beae422bcf15f3e7e8eb0c1295bec20a245ff7c..930f670a3d355e1aaa084c50e3fca6812332b0da 100644
--- a/docker/Dockerfile_ubuntu_18.04
+++ b/docker/Dockerfile_ubuntu_18.04
@@ -14,7 +14,6 @@ RUN apt-get update && \
         python3-sphinx \
         python3-numpydoc \
         python3-sphinx-gallery \
-        python3-sphinx-rtd-theme \
         python3-matplotlib \
         python3-pil \
         python3-tk \