From f5035e4c270edbac2c045fcb5f101e5aec3c7158 Mon Sep 17 00:00:00 2001 From: juniorxsound Date: Mon, 15 Jun 2020 17:25:18 -0400 Subject: [PATCH] Add 2.83 images and fix Python header version mismatch --- .travis.yml | 4 +- dist/2.80-cpu-ubuntu18.04/Dockerfile | 14 +++---- dist/2.80-gpu-ubuntu18.04/Dockerfile | 14 +++---- dist/2.81-cpu-ubuntu18.04/Dockerfile | 14 +++---- dist/2.81-gpu-ubuntu18.04/Dockerfile | 14 +++---- dist/2.82-cpu-ubuntu18.04/Dockerfile | 12 +++--- dist/2.82-gpu-ubuntu18.04/Dockerfile | 13 ++++--- dist/2.83-cpu-ubuntu18.04/Dockerfile | 56 +++++++++++++++++++++++++++ dist/2.83-gpu-ubuntu18.04/Dockerfile | 57 ++++++++++++++++++++++++++++ generate.py | 10 ++--- manifest.json | 24 ++++++++++++ 11 files changed, 186 insertions(+), 46 deletions(-) create mode 100644 dist/2.83-cpu-ubuntu18.04/Dockerfile create mode 100644 dist/2.83-gpu-ubuntu18.04/Dockerfile diff --git a/.travis.yml b/.travis.yml index 77081b1..944f366 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,9 @@ script: - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker push nytimes/blender:2.81-gpu-ubuntu18.04; fi - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker push nytimes/blender:2.82-cpu-ubuntu18.04; fi - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker push nytimes/blender:2.82-gpu-ubuntu18.04; fi - - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker tag nytimes/blender:2.82-gpu-ubuntu18.04 nytimes/blender:latest; fi + - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker push nytimes/blender:2.83-cpu-ubuntu18.04; fi + - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker push nytimes/blender:2.83-gpu-ubuntu18.04; fi + - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker tag nytimes/blender:2.83-gpu-ubuntu18.04 nytimes/blender:latest; fi - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then docker push nytimes/blender:latest; fi after_success: - bash ./notify.sh \ No newline at end of file diff --git a/dist/2.80-cpu-ubuntu18.04/Dockerfile b/dist/2.80-cpu-ubuntu18.04/Dockerfile index b2108f6..772bdd0 100644 --- a/dist/2.80-cpu-ubuntu18.04/Dockerfile +++ b/dist/2.80-cpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 02/19/2020, 03:21:31 by juniorxsound +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound # Please do not edit this file directly FROM ubuntu:18.04 @@ -32,16 +32,16 @@ RUN apt-get update && apt-get install -y \ # Download and install Blender RUN wget https://mirror.clarkson.edu/blender/release/Blender2.80/blender-2.80-linux-glibc217-x86_64.tar.bz2 \ - && tar -xvjf blender-2.80-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ + && tar -xjvf blender-2.80-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ && rm -rf blender-2.80-linux-glibc217-x86_64.tar.bz2 \ && rm -rf blender-2.80-linux-glibc217-x86_64 # Download the Python source since it is not bundled with Blender -RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz \ - && tar -xzf Python-3.6.8.tgz \ - && cp Python-3.6.8/Include/* $BLENDER_PATH/python/include/python3.7m/ \ - && rm -rf Python-3.6.8.tgz \ - && rm -rf Python-3.6.8 +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 # Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy diff --git a/dist/2.80-gpu-ubuntu18.04/Dockerfile b/dist/2.80-gpu-ubuntu18.04/Dockerfile index c5d1647..9dd2445 100644 --- a/dist/2.80-gpu-ubuntu18.04/Dockerfile +++ b/dist/2.80-gpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 02/19/2020, 03:21:31 by juniorxsound +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound # Please do not edit this file directly FROM nvidia/cudagl:10.1-base-ubuntu18.04 @@ -32,16 +32,16 @@ RUN apt-get update && apt-get install -y \ # Download and install Blender RUN wget https://mirror.clarkson.edu/blender/release/Blender2.80/blender-2.80-linux-glibc217-x86_64.tar.bz2 \ - && tar -xvjf blender-2.80-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ + && tar -xjvf blender-2.80-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ && rm -rf blender-2.80-linux-glibc217-x86_64.tar.bz2 \ && rm -rf blender-2.80-linux-glibc217-x86_64 # Download the Python source since it is not bundled with Blender -RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz \ - && tar -xzf Python-3.6.8.tgz \ - && cp Python-3.6.8/Include/* $BLENDER_PATH/python/include/python3.7m/ \ - && rm -rf Python-3.6.8.tgz \ - && rm -rf Python-3.6.8 +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 # Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy diff --git a/dist/2.81-cpu-ubuntu18.04/Dockerfile b/dist/2.81-cpu-ubuntu18.04/Dockerfile index ae82207..3938204 100644 --- a/dist/2.81-cpu-ubuntu18.04/Dockerfile +++ b/dist/2.81-cpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 02/19/2020, 03:21:31 by juniorxsound +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound # Please do not edit this file directly FROM ubuntu:18.04 @@ -32,16 +32,16 @@ RUN apt-get update && apt-get install -y \ # Download and install Blender RUN wget https://mirror.clarkson.edu/blender/release/Blender2.81/blender-2.81-linux-glibc217-x86_64.tar.bz2 \ - && tar -xvjf blender-2.81-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ + && tar -xjvf blender-2.81-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ && rm -rf blender-2.81-linux-glibc217-x86_64.tar.bz2 \ && rm -rf blender-2.81-linux-glibc217-x86_64 # Download the Python source since it is not bundled with Blender -RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz \ - && tar -xzf Python-3.6.8.tgz \ - && cp Python-3.6.8/Include/* $BLENDER_PATH/python/include/python3.7m/ \ - && rm -rf Python-3.6.8.tgz \ - && rm -rf Python-3.6.8 +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 # Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy diff --git a/dist/2.81-gpu-ubuntu18.04/Dockerfile b/dist/2.81-gpu-ubuntu18.04/Dockerfile index 34a89d5..a330c75 100644 --- a/dist/2.81-gpu-ubuntu18.04/Dockerfile +++ b/dist/2.81-gpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 02/19/2020, 03:21:31 by juniorxsound +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound # Please do not edit this file directly FROM nvidia/cudagl:10.1-base-ubuntu18.04 @@ -32,16 +32,16 @@ RUN apt-get update && apt-get install -y \ # Download and install Blender RUN wget https://mirror.clarkson.edu/blender/release/Blender2.81/blender-2.81-linux-glibc217-x86_64.tar.bz2 \ - && tar -xvjf blender-2.81-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ + && tar -xjvf blender-2.81-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \ && rm -rf blender-2.81-linux-glibc217-x86_64.tar.bz2 \ && rm -rf blender-2.81-linux-glibc217-x86_64 # Download the Python source since it is not bundled with Blender -RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz \ - && tar -xzf Python-3.6.8.tgz \ - && cp Python-3.6.8/Include/* $BLENDER_PATH/python/include/python3.7m/ \ - && rm -rf Python-3.6.8.tgz \ - && rm -rf Python-3.6.8 +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 # Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy diff --git a/dist/2.82-cpu-ubuntu18.04/Dockerfile b/dist/2.82-cpu-ubuntu18.04/Dockerfile index 54f2798..5d5086c 100644 --- a/dist/2.82-cpu-ubuntu18.04/Dockerfile +++ b/dist/2.82-cpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 02/26/2020, 09:07:41 by flask +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound # Please do not edit this file directly FROM ubuntu:18.04 @@ -38,11 +38,11 @@ RUN wget https://mirror.clarkson.edu/blender/release/Blender2.82/blender-2.82-li && rm -rf blender-2.82-linux64 # Download the Python source since it is not bundled with Blender -RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz \ - && tar -xzf Python-3.6.8.tgz \ - && cp Python-3.6.8/Include/* $BLENDER_PATH/python/include/python3.7m/ \ - && rm -rf Python-3.6.8.tgz \ - && rm -rf Python-3.6.8 +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 # Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy diff --git a/dist/2.82-gpu-ubuntu18.04/Dockerfile b/dist/2.82-gpu-ubuntu18.04/Dockerfile index 818a87f..9262d21 100644 --- a/dist/2.82-gpu-ubuntu18.04/Dockerfile +++ b/dist/2.82-gpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 02/26/2020, 09:07:41 by flask +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound # Please do not edit this file directly FROM nvidia/cudagl:10.1-base-ubuntu18.04 @@ -29,6 +29,7 @@ RUN apt-get update && apt-get install -y \ libfontconfig1 \ libxrender1 \ libgl1-mesa-glx \ + xz-utils \ xz-utils # Download and install Blender @@ -38,11 +39,11 @@ RUN wget https://mirror.clarkson.edu/blender/release/Blender2.82/blender-2.82-li && rm -rf blender-2.82-linux64 # Download the Python source since it is not bundled with Blender -RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz \ - && tar -xzf Python-3.6.8.tgz \ - && cp Python-3.6.8/Include/* $BLENDER_PATH/python/include/python3.7m/ \ - && rm -rf Python-3.6.8.tgz \ - && rm -rf Python-3.6.8 +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 # Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy diff --git a/dist/2.83-cpu-ubuntu18.04/Dockerfile b/dist/2.83-cpu-ubuntu18.04/Dockerfile new file mode 100644 index 0000000..9802238 --- /dev/null +++ b/dist/2.83-cpu-ubuntu18.04/Dockerfile @@ -0,0 +1,56 @@ +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound +# Please do not edit this file directly + +FROM ubuntu:18.04 + +LABEL Author="Or Fleisher " +LABEL Title="Blender in Docker" + +# Enviorment variables +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 +ENV PATH "$PATH:/bin/2.83/python/bin/" +ENV BLENDER_PATH "/bin/2.83" +ENV BLENDERPIP "/bin/2.83/python/bin/pip3" +ENV BLENDERPY "/bin/2.83/python/bin/python3.7m" +ENV HW="CPU" + +# Install dependencies +RUN apt-get update && apt-get install -y \ + wget \ + libopenexr-dev \ + bzip2 \ + build-essential \ + zlib1g-dev \ + libxmu-dev \ + libxi-dev \ + libxxf86vm-dev \ + libfontconfig1 \ + libxrender1 \ + libgl1-mesa-glx \ + xz-utils \ + xz-utils \ + xz-utils + +# Download and install Blender +RUN wget https://mirror.clarkson.edu/blender/release/Blender2.83/blender-2.83.0-linux64.tar.xz \ + && tar -xvf blender-2.83.0-linux64.tar.xz --strip-components=1 -C /bin \ + && rm -rf blender-2.83.0-linux64.tar.xz \ + && rm -rf blender-2.83.0-linux64 + +# Download the Python source since it is not bundled with Blender +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 + +# Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one +RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy + +# Must first ensurepip to install Blender pip3 and then new numpy +RUN ${BLENDERPY} -m ensurepip && ${BLENDERPIP} install --upgrade pip && ${BLENDERPIP} install numpy + +# Set the working directory +WORKDIR / \ No newline at end of file diff --git a/dist/2.83-gpu-ubuntu18.04/Dockerfile b/dist/2.83-gpu-ubuntu18.04/Dockerfile new file mode 100644 index 0000000..7d9d62d --- /dev/null +++ b/dist/2.83-gpu-ubuntu18.04/Dockerfile @@ -0,0 +1,57 @@ +# Dockerfile autogenerated on 06/15/2020, 17:03:56 by juniorxsound +# Please do not edit this file directly + +FROM nvidia/cudagl:10.1-base-ubuntu18.04 + +LABEL Author="Or Fleisher " +LABEL Title="Blender in Docker" + +# Enviorment variables +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 +ENV PATH "$PATH:/bin/2.83/python/bin/" +ENV BLENDER_PATH "/bin/2.83" +ENV BLENDERPIP "/bin/2.83/python/bin/pip3" +ENV BLENDERPY "/bin/2.83/python/bin/python3.7m" +ENV HW="GPU" + +# Install dependencies +RUN apt-get update && apt-get install -y \ + wget \ + libopenexr-dev \ + bzip2 \ + build-essential \ + zlib1g-dev \ + libxmu-dev \ + libxi-dev \ + libxxf86vm-dev \ + libfontconfig1 \ + libxrender1 \ + libgl1-mesa-glx \ + xz-utils \ + xz-utils \ + xz-utils \ + xz-utils + +# Download and install Blender +RUN wget https://mirror.clarkson.edu/blender/release/Blender2.83/blender-2.83.0-linux64.tar.xz \ + && tar -xvf blender-2.83.0-linux64.tar.xz --strip-components=1 -C /bin \ + && rm -rf blender-2.83.0-linux64.tar.xz \ + && rm -rf blender-2.83.0-linux64 + +# Download the Python source since it is not bundled with Blender +RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ + && tar -xzf Python-3.7.0.tgz \ + && cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ + && rm -rf Python-3.7.0.tgz \ + && rm -rf Python-3.7.0 + +# Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one +RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy + +# Must first ensurepip to install Blender pip3 and then new numpy +RUN ${BLENDERPY} -m ensurepip && ${BLENDERPIP} install --upgrade pip && ${BLENDERPIP} install numpy + +# Set the working directory +WORKDIR / \ No newline at end of file diff --git a/generate.py b/generate.py index bef6c6c..0bd8ff5 100755 --- a/generate.py +++ b/generate.py @@ -80,11 +80,11 @@ def create_dockerfile(base_os: str, blender_download_url.split("/")[-1].split(".tar."+archivetype)[0]) dockerfile += "# Download the Python source since it is not bundled with Blender\n" - dockerfile += "RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz \ \n" - dockerfile += "\u0009&& tar -xzf Python-3.6.8.tgz \ \n" - dockerfile += "\u0009&& cp Python-3.6.8/Include/* $BLENDER_PATH/python/include/python3.7m/ \ \n" - dockerfile += "\u0009&& rm -rf Python-3.6.8.tgz \ \n" - dockerfile += "\u0009&& rm -rf Python-3.6.8 \n\n" + dockerfile += "RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ \n" + dockerfile += "\u0009&& tar -xzf Python-3.7.0.tgz \ \n" + dockerfile += "\u0009&& cp -r Python-3.7.0/Include/* $BLENDER_PATH/python/include/python3.7m/ \ \n" + dockerfile += "\u0009&& rm -rf Python-3.7.0.tgz \ \n" + dockerfile += "\u0009&& rm -rf Python-3.7.0 \n\n" dockerfile += "# Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one\n" dockerfile += "RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7/site-packages/numpy \n\n" diff --git a/manifest.json b/manifest.json index d5d0c5e..6240f85 100644 --- a/manifest.json +++ b/manifest.json @@ -92,6 +92,30 @@ "BLENDERPY \"/bin/2.82/python/bin/python3.7m\"", "HW=\"GPU\"" ] + }, + { + "tag": "2.83-cpu-ubuntu18.04", + "base_os_image": "ubuntu:18.04", + "blender_download_url": "https://mirror.clarkson.edu/blender/release/Blender2.83/blender-2.83.0-linux64.tar.xz", + "env": [ + "PATH \"$PATH:/bin/2.83/python/bin/\"", + "BLENDER_PATH \"/bin/2.83\"", + "BLENDERPIP \"/bin/2.83/python/bin/pip3\"", + "BLENDERPY \"/bin/2.83/python/bin/python3.7m\"", + "HW=\"CPU\"" + ] + }, + { + "tag": "2.83-gpu-ubuntu18.04", + "base_os_image": "nvidia/cudagl:10.1-base-ubuntu18.04", + "blender_download_url": "https://mirror.clarkson.edu/blender/release/Blender2.83/blender-2.83.0-linux64.tar.xz", + "env": [ + "PATH \"$PATH:/bin/2.83/python/bin/\"", + "BLENDER_PATH \"/bin/2.83\"", + "BLENDERPIP \"/bin/2.83/python/bin/pip3\"", + "BLENDERPY \"/bin/2.83/python/bin/python3.7m\"", + "HW=\"GPU\"" + ] } ]