2021-06-09 14:21:05 +00:00
|
|
|
# Dockerfile autogenerated on 06/09/2021, 09:43:33 by juniorxsound
|
2020-01-12 22:55:13 +00:00
|
|
|
# Please do not edit this file directly
|
|
|
|
|
|
|
|
FROM nvidia/cudagl:10.1-base-ubuntu18.04
|
|
|
|
|
2020-02-19 08:22:06 +00:00
|
|
|
LABEL Author="Or Fleisher <or.fleisher@nytimes.com>"
|
|
|
|
LABEL Title="Blender in Docker"
|
2020-01-12 22:55:13 +00:00
|
|
|
|
|
|
|
# Enviorment variables
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV LC_ALL C.UTF-8
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
ENV PATH "$PATH:/bin/2.80/python/bin/"
|
|
|
|
ENV BLENDER_PATH "/bin/2.80"
|
|
|
|
ENV BLENDERPIP "/bin/2.80/python/bin/pip3"
|
|
|
|
ENV BLENDERPY "/bin/2.80/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
|
|
|
|
|
|
|
|
# Download and install Blender
|
|
|
|
RUN wget https://mirror.clarkson.edu/blender/release/Blender2.80/blender-2.80-linux-glibc217-x86_64.tar.bz2 \
|
2020-06-15 21:25:18 +00:00
|
|
|
&& tar -xjvf blender-2.80-linux-glibc217-x86_64.tar.bz2 --strip-components=1 -C /bin \
|
2020-01-12 22:55:13 +00:00
|
|
|
&& 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
|
2020-06-15 21:25:18 +00:00
|
|
|
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
|
2020-01-12 22:55:13 +00:00
|
|
|
|
|
|
|
# Blender comes with a super outdated version of numpy (which is needed for matplotlib / opencv) so override it with a modern one
|
2021-06-09 14:21:05 +00:00
|
|
|
RUN rm -rf ${BLENDER_PATH}/python/lib/python3.7m/site-packages/numpy
|
2020-01-12 22:55:13 +00:00
|
|
|
|
|
|
|
# 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 /
|