Last active
July 29, 2019 13:04
-
-
Save fritschy/f413231c2a9587dcd675599dabef5a02 to your computer and use it in GitHub Desktop.
Blender from source Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster | |
ENV LC_ALL C.UTF-8 | |
RUN apt update | |
RUN apt install -y --no-install-recommends git | |
RUN git clone -j$(nproc) --recursive -b blender-v2.80-release git://git.blender.org/blender.git /usr/src/blender | |
#RUN git clone https://github.com/OpenImageIO/oiio /usr/src/oiio | |
#RUN apt install -y alembic | |
RUN apt install -y --no-install-recommends libboost-all-dev | |
RUN apt install -y --no-install-recommends libopencolorio-dev | |
RUN apt install -y --no-install-recommends libopenexr-dev libpng-dev libjpeg-dev libtiff-dev | |
RUN apt install -y --no-install-recommends g++ clang build-essential cmake yasm ninja-build runit | |
RUN apt install -y --no-install-recommends libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libavresample-dev libavutil-dev | |
RUN apt install -y --no-install-recommends libfftw3-dev | |
RUN apt install -y --no-install-recommends libfreetype6-dev | |
RUN apt install -y --no-install-recommends flex bison | |
RUN apt install -y --no-install-recommends libtbb-dev | |
RUN apt install -y --no-install-recommends libsqlite3-dev | |
RUN apt install -y --no-install-recommends libbz2-dev | |
RUN apt install -y --no-install-recommends libssl-dev | |
RUN apt install -y --no-install-recommends libopenal-dev | |
RUN apt install -y --no-install-recommends libtheora-dev libvorbis-dev libogg-dev | |
RUN apt install -y --no-install-recommends libxml2-dev libtinyxml-dev | |
RUN apt install -y --no-install-recommends libjemalloc-dev | |
RUN apt install -y --no-install-recommends python3.7-numpy | |
RUN apt install -y --no-install-recommends libgl1-mesa-dev libglu1-mesa-dev | |
RUN apt install -y --no-install-recommends libopenimageio-dev | |
RUN apt -y clean | |
RUN rm -rf /var/lib/apt/lists/* | |
#RUN cd /usr/src/oiio && \ | |
# make -j16 USE_SIMD=sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,avx512f INSTALL_PREFIX=/usr/local && \ | |
# make cmakeinstall | |
RUN cd /usr/src/blender && \ | |
mkdir b && \ | |
cd b && \ | |
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_OPENIMAGEIO=ON -DCMAKE_INSTALL_PREFIX=/usr/local/blender -DWITH_CODEC_FFMPEG=ON -DWITH_CYCLES_NATIVE_ONLY=ON -DWITH_FFTW3=ON -DWITH_HEADLESS=ON -DWITH_MOD_OCEANSIM=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-O3 -march=native -ffp-contract=fast" -DCMAKE_CXX_FLAGS="-O3 -march=native -ffp-contract=fast" -G Ninja .. | |
RUN ninja -C /usr/src/blender/b | |
RUN ninja -C /usr/src/blender/b install | |
STOPSIGNAL SIGINT | |
ENTRYPOINT ["sh", "-c", "chpst -b renderer /usr/local/blender/blender -b \"$@\" & P=$!; wait $P", "--"] | |
#ENTRYPOINT ["nice", "chpst", "-b", "renderer", "/usr/local/blender/blender", "-b"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment