Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blender version 3.4.0 added to manifest.json #51

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,73 @@ steps:
repo: nytimes/blender
tags:
- 3.3.1-gpu-ubuntu18.04
username:
from_secret: docker_username

trigger:
branch:
- master
event:
- push

---
kind: pipeline
name: 3.4.0-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.4.0-cpu-ubuntu18.04
pull: if-not-exists
image: plugins/docker
settings:
dockerfile: dist/3.4.0-cpu-ubuntu18.04/Dockerfile
password:
from_secret: docker_password
repo: nytimes/blender
tags: 3.4.0-cpu-ubuntu18.04
username:
from_secret: docker_username

trigger:
branch:
- master
event:
- push

---
kind: pipeline
name: 3.4.0-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.4.0-gpu-ubuntu18.04
pull: if-not-exists
image: plugins/docker
settings:
dockerfile: dist/3.4.0-gpu-ubuntu18.04/Dockerfile
password:
from_secret: docker_password
repo: nytimes/blender
tags:
- 3.4.0-gpu-ubuntu18.04
- latest
username:
from_secret: docker_username
Expand Down Expand Up @@ -839,6 +906,8 @@ depends_on:
- 3.2-cpu-ubuntu18.04
- 3.3.1-gpu-ubuntu18.04
- 3.3.1-cpu-ubuntu18.04
- 3.4.0-gpu-ubuntu18.04
- 3.4.0-cpu-ubuntu18.04

trigger:
branch:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0
- `nytimes/blender:3.4.0-cpu-ubuntu18.04`
- `nytimes/blender:3.4.0-gpu-ubuntu18.04`
### 3.3.1
- `nytimes/blender:3.3.1-cpu-ubuntu18.04`
- `nytimes/blender:3.3.1-gpu-ubuntu18.04`
Expand Down
54 changes: 54 additions & 0 deletions dist/3.4.0-cpu-ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Dockerfile autogenerated on 12/07/2022, 23:35:32 by saura
# Please do not edit this file directly

FROM ubuntu:18.04

LABEL Author="Or Fleisher <or.fleisher@nytimes.com>"
LABEL Title="Blender in Docker"

# Environment variables
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV PATH "$PATH:/bin/3.4/python/bin/"
ENV BLENDER_PATH "/bin/3.4"
ENV BLENDERPIP "/bin/3.4/python/bin/pip3"
ENV BLENDERPY "/bin/3.4/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/Blender3.4/blender-3.4.0-linux-x64.tar.xz \
&& tar -xvf blender-3.4.0-linux-x64.tar.xz --strip-components=1 -C /bin \
&& rm -rf blender-3.4.0-linux-x64.tar.xz \
&& rm -rf blender-3.4.0-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 /
54 changes: 54 additions & 0 deletions dist/3.4.0-gpu-ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Dockerfile autogenerated on 12/07/2022, 23:35:32 by saura
# Please do not edit this file directly

FROM nvidia/cudagl:10.1-base-ubuntu18.04

LABEL Author="Or Fleisher <or.fleisher@nytimes.com>"
LABEL Title="Blender in Docker"

# Environment variables
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV PATH "$PATH:/bin/3.4/python/bin/"
ENV BLENDER_PATH "/bin/3.4"
ENV BLENDERPIP "/bin/3.4/python/bin/pip3"
ENV BLENDERPY "/bin/3.4/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/Blender3.4/blender-3.4.0-linux-x64.tar.xz \
&& tar -xvf blender-3.4.0-linux-x64.tar.xz --strip-components=1 -C /bin \
&& rm -rf blender-3.4.0-linux-x64.tar.xz \
&& rm -rf blender-3.4.0-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 /
31 changes: 30 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"libxxf86vm-dev",
"libfontconfig1",
"libxrender1",
"libgl1-mesa-glx"
"libgl1-mesa-glx",
"libxkbcommon-x11-0"
],
"images": [
{
Expand Down Expand Up @@ -356,6 +357,34 @@
"BLENDERPY \"/bin/3.3/python/bin/python3.10\"",
"HW=\"GPU\""
]
},
{
"tag": "3.4.0-cpu-ubuntu18.04",
"base_os_image": "ubuntu:18.04",
"blender_download_url": "https://mirror.clarkson.edu/blender/release/Blender3.4/blender-3.4.0-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.4/python/bin/\"",
"BLENDER_PATH \"/bin/3.4\"",
"BLENDERPIP \"/bin/3.4/python/bin/pip3\"",
"BLENDERPY \"/bin/3.4/python/bin/python3.10\"",
"HW=\"CPU\""
]
},
{
"tag": "3.4.0-gpu-ubuntu18.04",
"base_os_image": "nvidia/cudagl:10.1-base-ubuntu18.04",
"blender_download_url": "https://mirror.clarkson.edu/blender/release/Blender3.4/blender-3.4.0-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.4/python/bin/\"",
"BLENDER_PATH \"/bin/3.4\"",
"BLENDERPIP \"/bin/3.4/python/bin/pip3\"",
"BLENDERPY \"/bin/3.4/python/bin/python3.10\"",
"HW=\"GPU\""
]
}
]
}