forked from zocker-160/blender-bpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-stable.builder.old
91 lines (62 loc) · 2.43 KB
/
Dockerfile-stable.builder.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM ubuntu
MAINTAINER zocker_160
ENV DEBIAN_FRONTEND noninteractive
ARG PYTHON_VER=3.7.7
ARG BLENDER_VER=2.90.1
RUN apt-get update
RUN apt-get -y install \
build-essential \
cmake \
curl \
git \
libffi-dev \
libssl-dev \
libx11-dev \
libxxf86vm-dev \
libxcursor-dev \
libxi-dev \
libxrandr-dev \
libxinerama-dev \
libglew-dev \
subversion \
zlib1g-dev \
sudo \
ncdu
# install Blender dependencies
#RUN apt-get install -y build-essential git subversion cmake libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libglew-dev
# install python
WORKDIR /home/tmp/python
ADD https://www.python.org/ftp/python/$PYTHON_VER/Python-$PYTHON_VER.tgz Python.tgz
RUN tar xzf Python.tgz
WORKDIR /home/tmp/python/Python-$PYTHON_VER
RUN ./configure --enable-optimizations
RUN make install
WORKDIR /home/tmp
#RUN git clone https://git.blender.org/blender.git
#WORKDIR /home/tmp/lib
#RUN svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_centos7_x86_64
ADD https://download.blender.org/source/blender-$BLENDER_VER.tar.xz Blender.tar.xz
RUN tar xzf Blender.tar.xz
WORKDIR /home/tmp/Blender
#RUN make update
#RUN git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
#RUN git submodule foreach 'git fetch origin; git checkout $(git describe --tags `git rev-list --tags --max-count=1`);'
RUN make bpy
RUN cp /home/tmp/build_linux_bpy/bin/bpy.so /usr/local/lib/python3.7/site-packages
#RUN cp -r /home/tmp/lib/linux_centos7_x86_64/python/lib/python3.7/site-packages/2.92 /usr/local/lib/python3.7/site-packages/
WORKDIR /bpy
RUN mv /home/tmp/build_linux_bpy/bin/bpy.so .
RUN mv /home/tmp/lib/linux_centos7_x86_64/python/lib/python3.7/site-packages/2.92 .
# test if it works
RUN python3 -c "import bpy;print(dir(bpy.types));print(bpy.app.version_string);"
CMD bash
#RUN python3 -c "import bpy;print(dir(bpy.types));"
#FROM python:3.7.9-buster
#RUN apt-get update && apt-get install -y sudo
#COPY --from=builder /home/docker/build_linux_bpy/bin/bpy.so /usr/local/lib/python3.7/site-packages
#COPY --from=builder /home/docker/lib/linux_centos7_x86_64/python/lib/python3.7/site-packages/2.91 /usr/local/lib/python3.7/site-packages/
#WORKDIR /tmp
#ADD https://raw.githubusercontent.com/sobotka/blender/master/build_files/build_environment/install_deps.sh install_deps.sh
#RUN chmod +x install_deps.sh && ./install_deps.sh
#WORKDIR /home/blender
#CMD bash