forked from haosulab/SAPIEN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker_install.sh
executable file
·33 lines (24 loc) · 1020 Bytes
/
docker_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
32
33
#!/bin/bash
[[ `python -V` =~ ^Python\ 3\.([0-9]+)\..*$ ]] || echo failed to detect Python version
PYTHON_VERSION=3${BASH_REMATCH[1]}
echo Python ${PYTHON_VERSION} detected
rm -rf sapien.egg-info
rm -f wheelhouse/*.whl
if [ -z ${VERSION} ]
then
echo VERSION variable is not specified
VERSION=2.0.0.dev$(date +"%Y%m%d")
echo VERSION defaults to ${VERSION}
fi
echo ${VERSION} > python/VERSION
echo __version__=\"${VERSION}\" > python/py_package/version.py
docker run -v `pwd`:/workspace/SAPIEN -it --rm \
-u $(id -u ${USER}):$(id -g ${USER}) \
fxiangucsd/sapien-build-env:latest bash -c "cd /workspace/SAPIEN && ./build.sh ${PYTHON_VERSION}"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd wheelhouse
pip3 uninstall -y sapien
pip3 install *
cd /tmp && rm stubs -rf && pybind11-stubgen sapien.core --ignore-invalid all
cp /tmp/stubs/sapien/core-stubs/__init__.pyi $DIR/python/py_package/core
cp -r /tmp/stubs/sapien/core-stubs/pysapien $DIR/python/py_package/core