Skip to content

Commit

Permalink
Merge pull request #233 from rapidsai/taureandyernv-colab-script-fix_…
Browse files Browse the repository at this point in the history
…0.11

[WIP] fix rapids-colab.sh to 0.11 and support stable releases
  • Loading branch information
taureandyernv authored Nov 27, 2019
2 parents 51a78b2 + 3a077df commit 5f22d18
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
16 changes: 9 additions & 7 deletions utils/rapids-colab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

set -eu

RAPIDS_VERSION="${1:-0.10}"

RAPIDS_VERSION="${1:-0.11}"


wget -nc https://github.com/rapidsai/notebooks-contrib/raw/master/utils/env-check.py
echo "Checking for GPU type:"
Expand All @@ -18,10 +20,6 @@ if [ ! -f Miniconda3-4.5.4-Linux-x86_64.sh ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
chmod +x Miniconda3-4.5.4-Linux-x86_64.sh
bash ./Miniconda3-4.5.4-Linux-x86_64.sh -b -f -p /usr/local

echo "Installing RAPIDS $RAPIDS_VERSION packages"
echo "Please standby, this will take a few minutes..."
# install RAPIDS packages

if [ $RAPIDS_VERSION == "0.11" ] ;then
echo "Installing RAPIDS $RAPIDS_VERSION packages from the nightly release channel"
Expand All @@ -30,17 +28,21 @@ if [ ! -f Miniconda3-4.5.4-Linux-x86_64.sh ]; then
conda install -y --prefix /usr/local \
-c rapidsai-nightly/label/xgboost -c rapidsai-nightly -c nvidia -c conda-forge \
python=3.6 cudatoolkit=10.1 \
cudf=$RAPIDS_VERSION cuml cugraph gcsfs pynvml \
cudf=$RAPIDS_VERSION cuml cugraph gcsfs pynvml cuspatial \
dask-cudf \
xgboost
# check to make sure that pyarrow is running the right version (0.15) for v0.11 or later
wget -nc https://github.com/rapidsai/notebooks-contrib/raw/master/utils/update_pyarrow.py

else
echo "Installing RAPIDS $RAPIDS_VERSION packages from the stable release channel"
echo "Please standby, this will take a few minutes..."
# install RAPIDS packages
conda install -y --prefix /usr/local \
-c rapidsai/label/xgboost -c rapidsai -c nvidia -c conda-forge \
python=3.6 cudatoolkit=10.1 \
cudf=$RAPIDS_VERSION cuml cugraph gcsfs pynvml \
cudf=$RAPIDS_VERSION cuml cugraph cuspatial gcsfs pynvml \

dask-cudf \
xgboost
fi
Expand Down
24 changes: 24 additions & 0 deletions utils/update_pyarrow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import re
import sys
import os

print('***********************************************************************')
print('Let us check on that pyarrow version...')
print('***********************************************************************')
print()

pyarrow_version = sys.modules["pyarrow"].__version__
f = re.search("0.15.+", pyarrow_version)
if(f == None):
for key in list(sys.modules.keys()):
if key.startswith("pyarrow"):
del sys.modules[key]
print(f"unloaded pyarrow {pyarrow_version}")
import pyarrow
pyarrow_version = sys.modules['pyarrow'].__version__
print(f"loaded pyarrow {pyarrow_version}")
del(pyarrow_version)
print(f"You're now running pyarrow {pyarrow_version} and are good to go!")

else:
print(f"You're running pyarrow {pyarrow_version} and are good to go!")

0 comments on commit 5f22d18

Please sign in to comment.