Skip to content

Commit

Permalink
Fix some setups in the script
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao-bo committed Oct 20, 2021
1 parent 4b38574 commit ecbc055
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions ci/scripts/ubuntu_build_test.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
#!/bin/bash

SHA=$1
PY=$2

set -ex

# Parse ARGs
for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
case "$KEY" in
SHA) SHA=${VALUE} ;;
PY) PY=${VALUE} ;;
*)
esac
done

source /home/dev/miniconda/etc/profile.d/conda.sh
conda activate $PY
conda activate $PY

# Build Taichi from source
git clone --recursive https://github.com/taichi-dev/taichi --branch=master
cd taichi
git checkout $SHA
python3 -m pip install --user -r requirements_dev.txt -i http://repo.taichigraphics.com/repository/pypi/simple --trusted-host repo.taichigraphics.com
python3 -m pip install -r requirements_dev.txt -i http://repo.taichigraphics.com/repository/pypi/simple --trusted-host repo.taichigraphics.com
# Update Torch version, otherwise cuda tests fail. See #2969.
python3 -m pip install torch==1.9.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html -i http://repo.taichigraphics.com/repository/pypi/simple --trusted-host repo.taichigraphics.com
TAICHI_CMAKE_ARGS="-DTI_WITH_VULKAN:BOOL=ON -DTI_WITH_CUDA:BOOL=ON -DTI_WITH_OPENGL:BOOL=ON" python3 setup.py develop --user

# Link Taichi source repo to Python Path
export PATH="/home/dev/taichi/bin:$PATH"
export TAICHI_REPO_DIR="/home/dev/taichi/"
export PYTHONPATH="$TAICHI_REPO_DIR/python:$PYTHONPATH"
TAICHI_CMAKE_ARGS="-DTI_WITH_VULKAN:BOOL=ON -DTI_WITH_CUDA:BOOL=ON -DTI_WITH_OPENGL:BOOL=ON" python3 setup.py install

# Add Docker specific ENV
export TI_IN_DOCKER=true
Expand Down

0 comments on commit ecbc055

Please sign in to comment.