From a437538c102cbc77e246741789968111bff4fd1e Mon Sep 17 00:00:00 2001 From: Nagarjuna Bandamedi Date: Sun, 23 Oct 2022 15:15:28 -0500 Subject: [PATCH 1/4] Add Blender 3.2 tags and generate new Dockerfiles --- .drone.yml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 66 insertions(+) diff --git a/.drone.yml b/.drone.yml index 9ba6355..dfd6838 100644 --- a/.drone.yml +++ b/.drone.yml @@ -721,6 +721,67 @@ steps: username: from_secret: docker_username +--- +kind: pipeline +name: 3.3.1-cpu-ubuntu18.04 + +platform: + os: linux + arch: amd64 + +steps: +- name: generate + pull: if-not-exists + image: python:3.8-slim + commands: + - python3 generate.py + +- name: 3.3.1-cpu-ubuntu18.04 + pull: if-not-exists + image: plugins/docker + settings: + dockerfile: dist/3.3.1-cpu-ubuntu18.04/Dockerfile + password: + from_secret: docker_password + repo: nytimes/blender + tags: 3.3.1-cpu-ubuntu18.04 + username: + from_secret: docker_username + +trigger: + branch: + - master + event: + - push + +--- +kind: pipeline +name: 3.3.1-gpu-ubuntu18.04 + +platform: + os: linux + arch: amd64 + +steps: +- name: generate + pull: if-not-exists + image: python:3.8-slim + commands: + - python3 generate.py + +- name: 3.3.1-gpu-ubuntu18.04 + pull: if-not-exists + image: plugins/docker + settings: + dockerfile: dist/3.3.1-gpu-ubuntu18.04/Dockerfile + password: + from_secret: docker_password + repo: nytimes/blender + tags: + - 3.3.1-gpu-ubuntu18.04 + - latest + username: + from_secret: docker_username trigger: branch: - master @@ -770,6 +831,8 @@ depends_on: - 3.1-cpu-ubuntu18.04 - 3.2-gpu-ubuntu18.04 - 3.2-cpu-ubuntu18.04 + - 3.3.1-gpu-ubuntu18.04 + - 3.3.1-cpu-ubuntu18.04 trigger: branch: diff --git a/README.md b/README.md index 713ec44..015049a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,9 @@ The images in this repository are autogenerated by running the `generate.py` scr ## Docker tags - `nytimes/blender:latest` - Latest GPU image with latest Blender version +### 3.3.1 +- `nytimes/blender:3.3.1-cpu-ubuntu18.04` +- `nytimes/blender:3.3.1-gpu-ubuntu18.04` ### 3.2 - `nytimes/blender:3.2-cpu-ubuntu18.04` - `nytimes/blender:3.2-gpu-ubuntu18.04` From 8681817432d3cf353b52fe73c029e7215e3ec39c Mon Sep 17 00:00:00 2001 From: Nagarjuna Bandamedi Date: Sun, 23 Oct 2022 15:23:20 -0500 Subject: [PATCH 2/4] adding docker 3.3.1 and menifest --- dist/3.3.1-cpu-ubuntu18.04/Dockerfile | 56 +++++++++++++++++++++++++++ dist/3.3.1-gpu-ubuntu18.04/Dockerfile | 56 +++++++++++++++++++++++++++ manifest.json | 28 ++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 dist/3.3.1-cpu-ubuntu18.04/Dockerfile create mode 100644 dist/3.3.1-gpu-ubuntu18.04/Dockerfile diff --git a/dist/3.3.1-cpu-ubuntu18.04/Dockerfile b/dist/3.3.1-cpu-ubuntu18.04/Dockerfile new file mode 100644 index 0000000..e18016e --- /dev/null +++ b/dist/3.3.1-cpu-ubuntu18.04/Dockerfile @@ -0,0 +1,56 @@ +# Dockerfile autogenerated on 06/20/2022, 07:33:14 by root +# Please do not edit this file directly + +FROM ubuntu:18.04 + +LABEL Author="Or Fleisher " +LABEL Title="Blender in Docker" + +# Environment variables +ENV BLENDER_VERSION "3.3.1" +ENV BLENDER_MAJOR_VERSION "3.3" +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 +ENV PATH "${PATH}:/bin/${BLENDER_MAJOR_VERSION}/python/bin/" +ENV BLENDER_PATH "/bin/${BLENDER_MAJOR_VERSION}" +ENV BLENDERPIP "/bin/${BLENDER_MAJOR_VERSION}/python/bin/pip3" +ENV BLENDERPY "/bin/${BLENDER_MAJOR_VERSION}/python/bin/python3.10" +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 + +# Download and install Blender +RUN wget "https://mirror.clarkson.edu/blender/release/Blender${BLENDER_MAJOR_VERSION}/blender-${BLENDER_VERSION}-linux-x64.tar.xz" \ + && tar -xvf blender-${BLENDER_VERSION}-linux-x64.tar.xz --strip-components=1 -C /bin \ + && rm -rf blender-${BLENDER_VERSION}-linux-x64.tar.xz \ + && rm -rf blender-${BLENDER_VERSION}-linux-x64 + +# Download the Python source since it is not bundled with Blender +RUN wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz \ + && tar -xzf Python-3.10.5.tgz \ + && cp -r Python-3.10.5/Include/* $BLENDER_PATH/python/include/python3.10/ \ + && rm -rf Python-3.10.5.tgz \ + && rm -rf Python-3.10.5 + +# 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.10/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/3.3.1-gpu-ubuntu18.04/Dockerfile b/dist/3.3.1-gpu-ubuntu18.04/Dockerfile new file mode 100644 index 0000000..e60bed0 --- /dev/null +++ b/dist/3.3.1-gpu-ubuntu18.04/Dockerfile @@ -0,0 +1,56 @@ +# Dockerfile autogenerated on 06/20/2022, 07:33:14 by root +# Please do not edit this file directly + +FROM nvidia/cudagl:10.1-base-ubuntu18.04 + +LABEL Author="Or Fleisher " +LABEL Title="Blender in Docker" + +# Environment variables +ENV BLENDER_VERSION "3.3.1" +ENV BLENDER_MAJOR_VERSION "3.3" +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 +ENV PATH "${PATH}:/bin/${BLENDER_MAJOR_VERSION}/python/bin/" +ENV BLENDER_PATH "/bin/${BLENDER_MAJOR_VERSION}" +ENV BLENDERPIP "/bin/${BLENDER_MAJOR_VERSION}/python/bin/pip3" +ENV BLENDERPY "/bin/${BLENDER_MAJOR_VERSION}/python/bin/python3.10" +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 + +# Download and install Blender +RUN wget "https://mirror.clarkson.edu/blender/release/Blender${BLENDER_MAJOR_VERSION}/blender-${BLENDER_VERSION}-linux-x64.tar.xz" \ + && tar -xvf blender-${BLENDER_VERSION}-linux-x64.tar.xz --strip-components=1 -C /bin \ + && rm -rf blender-${BLENDER_VERSION}-linux-x64.tar.xz \ + && rm -rf blender-${BLENDER_VERSION}-linux-x64 + +# Download the Python source since it is not bundled with Blender +RUN wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz \ + && tar -xzf Python-3.10.5.tgz \ + && cp -r Python-3.10.5/Include/* $BLENDER_PATH/python/include/python3.10/ \ + && rm -rf Python-3.10.5.tgz \ + && rm -rf Python-3.10.5 + +# 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.10/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/manifest.json b/manifest.json index d2c2003..4f2066d 100644 --- a/manifest.json +++ b/manifest.json @@ -328,6 +328,34 @@ "BLENDERPY \"/bin/3.2/python/bin/python3.10\"", "HW=\"GPU\"" ] + }, + { + "tag": "3.3.1-cpu-ubuntu18.04", + "base_os_image": "ubuntu:18.04", + "blender_download_url": "https://mirror.clarkson.edu/blender/release/Blender3.3/blender-3.3.1-linux-x64.tar.xz", + "python_download_url": "https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz", + "python_version": "python3.10", + "env": [ + "PATH \"$PATH:/bin/3.3/python/bin/\"", + "BLENDER_PATH \"/bin/3.3\"", + "BLENDERPIP \"/bin/3.3/python/bin/pip3\"", + "BLENDERPY \"/bin/3.3/python/bin/python3.10\"", + "HW=\"CPU\"" + ] + }, + { + "tag": "3.3.1-gpu-ubuntu18.04", + "base_os_image": "nvidia/cudagl:10.1-base-ubuntu18.04", + "blender_download_url": "https://mirror.clarkson.edu/blender/release/Blender3.3/blender-3.3.1-linux-x64.tar.xz", + "python_download_url": "https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz", + "python_version": "python3.10", + "env": [ + "PATH \"$PATH:/bin/3.3/python/bin/\"", + "BLENDER_PATH \"/bin/3.3\"", + "BLENDERPIP \"/bin/3.3/python/bin/pip3\"", + "BLENDERPY \"/bin/3.3/python/bin/python3.10\"", + "HW=\"GPU\"" + ] } ] } From 4598004a102e7bea5e0e7a3d5cfe3f04dba7a77b Mon Sep 17 00:00:00 2001 From: Nagarjuna Bandamedi Date: Sun, 23 Oct 2022 22:19:49 -0500 Subject: [PATCH 3/4] Auto generated 3.3.1 docker --- dist/3.3.1-cpu-ubuntu18.04/Dockerfile | 20 +++++++++----------- dist/3.3.1-gpu-ubuntu18.04/Dockerfile | 20 +++++++++----------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/dist/3.3.1-cpu-ubuntu18.04/Dockerfile b/dist/3.3.1-cpu-ubuntu18.04/Dockerfile index e18016e..4c5c1c9 100644 --- a/dist/3.3.1-cpu-ubuntu18.04/Dockerfile +++ b/dist/3.3.1-cpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 06/20/2022, 07:33:14 by root +# Dockerfile autogenerated on 10/23/2022, 22:17:04 by nagar # Please do not edit this file directly FROM ubuntu:18.04 @@ -7,15 +7,13 @@ LABEL Author="Or Fleisher " LABEL Title="Blender in Docker" # Environment variables -ENV BLENDER_VERSION "3.3.1" -ENV BLENDER_MAJOR_VERSION "3.3" ENV DEBIAN_FRONTEND noninteractive ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 -ENV PATH "${PATH}:/bin/${BLENDER_MAJOR_VERSION}/python/bin/" -ENV BLENDER_PATH "/bin/${BLENDER_MAJOR_VERSION}" -ENV BLENDERPIP "/bin/${BLENDER_MAJOR_VERSION}/python/bin/pip3" -ENV BLENDERPY "/bin/${BLENDER_MAJOR_VERSION}/python/bin/python3.10" +ENV PATH "$PATH:/bin/3.3/python/bin/" +ENV BLENDER_PATH "/bin/3.3" +ENV BLENDERPIP "/bin/3.3/python/bin/pip3" +ENV BLENDERPY "/bin/3.3/python/bin/python3.10" ENV HW="CPU" # Install dependencies @@ -34,10 +32,10 @@ RUN apt-get update && apt-get install -y \ xz-utils # Download and install Blender -RUN wget "https://mirror.clarkson.edu/blender/release/Blender${BLENDER_MAJOR_VERSION}/blender-${BLENDER_VERSION}-linux-x64.tar.xz" \ - && tar -xvf blender-${BLENDER_VERSION}-linux-x64.tar.xz --strip-components=1 -C /bin \ - && rm -rf blender-${BLENDER_VERSION}-linux-x64.tar.xz \ - && rm -rf blender-${BLENDER_VERSION}-linux-x64 +RUN wget https://mirror.clarkson.edu/blender/release/Blender3.3/blender-3.3.1-linux-x64.tar.xz \ + && tar -xvf blender-3.3.1-linux-x64.tar.xz --strip-components=1 -C /bin \ + && rm -rf blender-3.3.1-linux-x64.tar.xz \ + && rm -rf blender-3.3.1-linux-x64 # Download the Python source since it is not bundled with Blender RUN wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz \ diff --git a/dist/3.3.1-gpu-ubuntu18.04/Dockerfile b/dist/3.3.1-gpu-ubuntu18.04/Dockerfile index e60bed0..93e210a 100644 --- a/dist/3.3.1-gpu-ubuntu18.04/Dockerfile +++ b/dist/3.3.1-gpu-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile autogenerated on 06/20/2022, 07:33:14 by root +# Dockerfile autogenerated on 10/23/2022, 22:17:04 by nagar # Please do not edit this file directly FROM nvidia/cudagl:10.1-base-ubuntu18.04 @@ -7,15 +7,13 @@ LABEL Author="Or Fleisher " LABEL Title="Blender in Docker" # Environment variables -ENV BLENDER_VERSION "3.3.1" -ENV BLENDER_MAJOR_VERSION "3.3" ENV DEBIAN_FRONTEND noninteractive ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 -ENV PATH "${PATH}:/bin/${BLENDER_MAJOR_VERSION}/python/bin/" -ENV BLENDER_PATH "/bin/${BLENDER_MAJOR_VERSION}" -ENV BLENDERPIP "/bin/${BLENDER_MAJOR_VERSION}/python/bin/pip3" -ENV BLENDERPY "/bin/${BLENDER_MAJOR_VERSION}/python/bin/python3.10" +ENV PATH "$PATH:/bin/3.3/python/bin/" +ENV BLENDER_PATH "/bin/3.3" +ENV BLENDERPIP "/bin/3.3/python/bin/pip3" +ENV BLENDERPY "/bin/3.3/python/bin/python3.10" ENV HW="GPU" # Install dependencies @@ -34,10 +32,10 @@ RUN apt-get update && apt-get install -y \ xz-utils # Download and install Blender -RUN wget "https://mirror.clarkson.edu/blender/release/Blender${BLENDER_MAJOR_VERSION}/blender-${BLENDER_VERSION}-linux-x64.tar.xz" \ - && tar -xvf blender-${BLENDER_VERSION}-linux-x64.tar.xz --strip-components=1 -C /bin \ - && rm -rf blender-${BLENDER_VERSION}-linux-x64.tar.xz \ - && rm -rf blender-${BLENDER_VERSION}-linux-x64 +RUN wget https://mirror.clarkson.edu/blender/release/Blender3.3/blender-3.3.1-linux-x64.tar.xz \ + && tar -xvf blender-3.3.1-linux-x64.tar.xz --strip-components=1 -C /bin \ + && rm -rf blender-3.3.1-linux-x64.tar.xz \ + && rm -rf blender-3.3.1-linux-x64 # Download the Python source since it is not bundled with Blender RUN wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz \ From 13e9b906cf561fefbe1765da464fe84727cfccff Mon Sep 17 00:00:00 2001 From: Nagarjuna Bandamedi Date: Sat, 12 Nov 2022 21:31:26 -0600 Subject: [PATCH 4/4] Added missing trigger and some nit picks --- .drone.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index dfd6838..359cb21 100644 --- a/.drone.yml +++ b/.drone.yml @@ -717,10 +717,15 @@ steps: repo: nytimes/blender tags: - 3.2-gpu-ubuntu18.04 - - latest username: from_secret: docker_username +trigger: + branch: + - master + event: + - push + --- kind: pipeline name: 3.3.1-cpu-ubuntu18.04 @@ -782,6 +787,7 @@ steps: - latest username: from_secret: docker_username + trigger: branch: - master