-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker_entrypoint.sh
executable file
·51 lines (42 loc) · 1.49 KB
/
docker_entrypoint.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
set -euo pipefail
echo "================================================================================"
echo " PYTHON_VERSION $PYTHON_VERSION"
echo " BUILD_PYTHON_MODULE $BUILD_PYTHON_MODULE"
echo " BUILD_APPIMAGE $BUILD_APPIMAGE"
echo " MAKE_FLAGS $MAKE_FLAGS"
echo "================================================================================"
conda create -y -n asr python=$PYTHON_VERSION
source activate asr
conda install -y cmake
python -m pip install torch==1.8.2+cpu -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
python -m pip install open3d==0.14.1 zstandard msgpack msgpack-numpy
pushd datasets
python create_t10k_msgpacks.py --attribution_file_only
popd
if [ -d build ]; then
rm -rf build
fi
mkdir build
pushd build
if [ "$BUILD_APPIMAGE" = "ON" ]; then
mkdir linuxdeploy
pushd linuxdeploy
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod u+x linuxdeploy-x86_64.AppImage
# FUSE does not work inside docker -> extract app image
./linuxdeploy-x86_64.AppImage --appimage-extract
rm linuxdeploy-x86_64.AppImage
popd
fi
linuxdeploy="$(pwd)/linuxdeploy/squashfs-root/AppRun"
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_PYTHON_MODULE=$BUILD_PYTHON_MODULE \
-DBUILD_APPIMAGE=$BUILD_APPIMAGE \
-Dlinuxdeploy_binary="$linuxdeploy" \
..
df -h
make $MAKE_FLAGS
mv python/python_package/dist/a*.whl appimage/asr*.AppImage . || true
popd