Skip to content

Commit ae22daa

Browse files
authored
Merge pull request #4419 from rtfd/humitos/docs/too-many-resources
More tips about how to reduce resources usage
2 parents 4c769d3 + a74ec85 commit ae22daa

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

docs/guides/build-using-too-many-resources.rst

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Reduce formats you're building
1212

1313
You can change the formats of docs that you're building with our YAML file's :ref:`yaml-config:Formats` option.
1414

15-
In particular, the `htmlzip` takes up a decent amount of memory and time,
15+
In particular, the ``htmlzip`` takes up a decent amount of memory and time,
1616
so disabling that format might solve your problem.
1717

1818
Reduce documentation build dependencies
@@ -23,3 +23,31 @@ If there are extra packages that you don't need for building docs,
2323
you can create a custom requirements file just for documentation.
2424
This should speed up your documentation builds,
2525
as well as reduce your memory footprint.
26+
27+
Use pip when possible
28+
---------------------
29+
30+
If you don't need ``conda`` to create your *documentation* environment,
31+
consider using ``pip`` instead since ``conda`` could `require too much memory`_ to calculate the dependency tree
32+
when using multiple channels.
33+
34+
.. _require too much memory: https://github.com/conda/conda/issues/5003>
35+
36+
37+
.. tip::
38+
39+
Even though your *project* environment is created with ``conda``, it may be not necessary for the *documentation* environment.
40+
That is, to build the documentation is probably that you need fewer Python packages than to use your library itself.
41+
So, in this case, you could use ``pip`` to install those fewer packages instead of creating a big environment with ``conda``.
42+
43+
44+
Use system site-packages for pre-installed libs
45+
-----------------------------------------------
46+
47+
There are a few libraries that Read the Docs has already installed (scipy, numpy, matplotlib, pandas, etc)
48+
in the Docker image used to build your docs. You can check the updated list of pre-installed libraries in the `Docker image repository`_.
49+
50+
To use these pre-installed libraries and avoid consuming time re-downloading/compiling them,
51+
you can use the :ref:`yaml-config:python.use_system_site_packages` option to have access to them.
52+
53+
.. _Docker image repository: https://github.com/rtfd/readthedocs-docker-images

0 commit comments

Comments
 (0)