Skip to content

Video editing with Python

Update Docker and the doc relative to docker usage

osaajani73d93a2b291a
diff --git a/Dockerfile b/Dockerfile
index 60dae47d..491c7434 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,6 +12,9 @@ RUN apt-get install -y locales && \
ENV LC_ALL C.UTF-8
-ADD . /var/src/moviepy/
-RUN cd /var/src/moviepy/ && pip install .
+# Update pip
+RUN pip install --upgrade pip
+
+ADD . /moviepy
+RUN cd /moviepy && pip install . && pip install .[test] && pip install .[doc] && pip install .[lint]
diff --git a/docs/docker.rst b/docs/getting_started/docker.rst
similarity index 67%
rename from docs/docker.rst
rename to docs/getting_started/docker.rst
index 3d9fcd86..8b983c20 100644
--- a/docs/docker.rst
+++ b/docs/getting_started/docker.rst
@@ -4,24 +4,22 @@ MoviePy Docker
Prerequisites
-------------
-1. Docker installed `Docker for Mac, Docker for windows, linux, etc <https://www.docker.com/get-docker/>`_
+Docker installed `Docker for Mac, Docker for windows, linux, etc <https://www.docker.com/get-docker/>`_
+
+Build the docker
+-----------------
+1. Move into the moviepy root dir
2. Build the Dockerfile ::
docker build -t moviepy -f Dockerfile .
-Steps to run the git repo unittests from docker
+How to run the unittests from docker
------------------------------------------------
-Get a bash prompt in the moviepy container ::
-
- cd tests
- docker run -it -v `pwd`:/tests moviepy bash
+Run pytest inside the container with the following command ::
-Run the tests ::
-
- cd tests
- python test_issues.py
+ docker run -w /moviepy -it moviepy python -m pytest
Running your own moviepy script from docker
--------------------------------------------
diff --git a/docs/getting_started/index.rst b/docs/getting_started/index.rst
index 2f99f8e7..46ea7331 100644
--- a/docs/getting_started/index.rst
+++ b/docs/getting_started/index.rst
@@ -12,5 +12,6 @@ This section explain everything you need to start editing with MoviePy. To go fu
install
quick_presentation
moviepy_10_minutes
+ docker
FAQ
diff --git a/docs/index.rst b/docs/index.rst
index 274bb6e2..cc2ca374 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -132,7 +132,6 @@ MoviePy is an open source software originally written by Zulko_ and released und
user_guide/index
reference/index
developer_guide/index
- docker
.. _PyPI: https://pypi.python.org/pypi/moviepy
diff --git a/docs/reference/reference/moviepy.tools.no_display_available.rst b/docs/reference/reference/moviepy.tools.no_display_available.rst
new file mode 100644
index 00000000..e4a29fa0
--- /dev/null
+++ b/docs/reference/reference/moviepy.tools.no_display_available.rst
@@ -0,0 +1,6 @@
+moviepy.tools.no\_display\_available
+====================================
+
+.. currentmodule:: moviepy.tools
+
+.. autofunction:: no_display_available
\ No newline at end of file
diff --git a/docs/reference/reference/moviepy.tools.rst b/docs/reference/reference/moviepy.tools.rst
index bd13efc2..84dc299f 100644
--- a/docs/reference/reference/moviepy.tools.rst
+++ b/docs/reference/reference/moviepy.tools.rst
@@ -1,4 +1,4 @@
-.. custom module to enable complete documentation of every function
+.. custom module to enable complete documentation of every function
see https://stackoverflow.com/a/62613202
moviepy.tools
@@ -26,6 +26,7 @@ moviepy.tools
cross_platform_popen_params
deprecated_version_of
find_extension
+ no_display_available
subprocess_call