diff mbox series

docker: pyenv: build at make -j$(nproc)

Message ID 20190912154102.30171-1-dja@axtens.net
State Accepted
Headers show
Series docker: pyenv: build at make -j$(nproc) | expand

Commit Message

Daniel Axtens Sept. 12, 2019, 3:41 p.m. UTC
This speeds up builds. I haven't measured by how much, but I have
observed 8 threads being complied rather than 1 on my laptop.

Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 tools/docker/Dockerfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andrew Donnellan Sept. 12, 2019, 4:06 p.m. UTC | #1
On 12/9/19 4:41 pm, Daniel Axtens wrote:
> This speeds up builds. I haven't measured by how much, but I have
> observed 8 threads being complied rather than 1 on my laptop.
> 
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>

> ---
>   tools/docker/Dockerfile | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
> index 35324b13c66a..dfc9c2f3dab1 100644
> --- a/tools/docker/Dockerfile
> +++ b/tools/docker/Dockerfile
> @@ -43,7 +43,8 @@ RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-instal
>       git clone https://github.com/momo-lab/xxenv-latest $PYENV_ROOT/plugins/xxenv-latest && \
>       pyenv update
>   
> -RUN pyenv latest install 2.7 && \
> +RUN export MAKE_OPTS=-j$(nproc) && \
> +    pyenv latest install 2.7 && \
>       pyenv latest install 3.5 && \
>       pyenv latest install 3.6 && \
>       pyenv latest install 3.7
>
Stephen Finucane Sept. 12, 2019, 4:15 p.m. UTC | #2
On Fri, 2019-09-13 at 01:41 +1000, Daniel Axtens wrote:
> This speeds up builds. I haven't measured by how much, but I have
> observed 8 threads being complied rather than 1 on my laptop.
> 
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Not tested, but if it works for you, I'm happy with it.

Reviewed-by: Stephen Finucane <stephen@that.guru>

/me wonders why this isn't the default in pyenv
diff mbox series

Patch

diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 35324b13c66a..dfc9c2f3dab1 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -43,7 +43,8 @@  RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-instal
     git clone https://github.com/momo-lab/xxenv-latest $PYENV_ROOT/plugins/xxenv-latest && \
     pyenv update
 
-RUN pyenv latest install 2.7 && \
+RUN export MAKE_OPTS=-j$(nproc) && \
+    pyenv latest install 2.7 && \
     pyenv latest install 3.5 && \
     pyenv latest install 3.6 && \
     pyenv latest install 3.7