-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.sh
31 lines (26 loc) · 1.07 KB
/
install.sh
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
BLENDER_WGET_LINK='https://download.blender.org/release/Blender3.1/blender-3.1.2-linux-x64.tar.xz'
BLENDER_WGET_FILE='blender.tar.xz'
BLENDER_UNTAR_DIR='blender-3.1.2-linux-x64'
BLENDER_PYTHON="blender/3.1/python/bin/python3.10"
BLENDER_INCLUDE="blender/3.1/python/include/python3.10"
PYTHON_WGET_LINK='https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tgz'
PYTHON_WGET_FILE='Python-3.10.2.tgz'
PYTHON_DIR='Python-3.10.2'
if [ ! -d "${BLENDER_DIR}" ]; then
wget -O "${BLENDER_WGET_FILE}" "${BLENDER_WGET_LINK}"
tar -xf "${BLENDER_WGET_FILE}"
mv "${BLENDER_UNTAR_DIR}" "${BLENDER_DIR}"
rm "${BLENDER_WGET_FILE}"
fi
# Install Conda dependencies
pip install -r requirements.txt
if [ ! -d "${PYTHON_DIR}" ]; then
# Install Python include file
wget -O "${PYTHON_WGET_FILE}" "${PYTHON_WGET_LINK}"
tar -xf "${PYTHON_WGET_FILE}"
rm "${PYTHON_WGET_FILE}"
fi
cp -r "${PYTHON_DIR}/Include/"* "${BLENDER_INCLUDE}"
# Install Blender dependencies
"${BLENDER_PYTHON}" -m ensurepip
CFLAGS="-I$(realpath ${BLENDER_INCLUDE})" "${BLENDER_PYTHON}" -m pip install -r "${REQUIREMENTS_PATH}"