-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from rapidsai/revert-12-gquant-34
Revert "gQuant34 - Update build.sh to make use of RAPIDS v0.8 container"
- Loading branch information
Showing
5 changed files
with
151 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,65 @@ | ||
#!/bin/bash | ||
|
||
echo "Building gQuant container..." | ||
|
||
read -p "Please, press '1' for cuda 9.2, or '2' for cuda 10.0. [1]/2: " CUDA_VERSION | ||
CUDA_VERSION=${CUDA_VERSION:-1} | ||
|
||
if [ "$CUDA_VERSION" -eq 2 ]; then | ||
echo "cuda 10.0 selected." | ||
CONTAINER='nvcr.io/nvidia/rapidsai/rapidsai:cuda10.0-runtime-ubuntu16.04' | ||
CUPY='cupy-cuda100' | ||
else | ||
echo "cuda 9.2 selected." | ||
CONTAINER='nvcr.io/nvidia/rapidsai/rapidsai:cuda9.2-runtime-ubuntu16.04' | ||
CUPY='cupy-cuda92' | ||
fi | ||
|
||
read -p "Would you like to install Vim JupyterLab Extension (optional) [N]/y: " VIM_INSTALL | ||
VIM_INSTALL=${VIM_INSTALL:-N} | ||
|
||
if [ "$VIM_INSTALL" = "Y" ] || [ "$VIM_INSTALL" = "y" ]; then | ||
echo "Vim JupyterLab Extension will be installed." | ||
else | ||
echo "Vim JupyterLab Extension will not be installed." | ||
fi | ||
|
||
D_FILE=${D_FILE:='Dockerfile.Rapids'} | ||
D_CONT=${D_CONT:='gquant/gquant:latest'} | ||
|
||
echo "Fetching latest version of gQuant project" | ||
git clone --recursive https://github.com/rapidsai/gQuant | ||
|
||
|
||
cat > $D_FILE <<EOF | ||
FROM $CONTAINER | ||
USER root | ||
FROM nvcr.io/nvidia/rapidsai/rapidsai:0.7-cuda10.0-devel-ubuntu18.04-gcc7-py3.6 | ||
ADD gQuant /rapids/gQuant | ||
USER root | ||
RUN apt-get update && apt-get install -y libfontconfig1 libxrender1 | ||
RUN apt-get update | ||
RUN apt-get install -y libfontconfig1 libxrender1 | ||
SHELL ["bash","-c"] | ||
# | ||
# Additional python libs | ||
# | ||
RUN pip install nxpd graphviz pudb dask_labextension sphinx sphinx_rtd_theme recommonmark numpydoc $CUPY | ||
RUN conda install -y -c conda-forge python-graphviz bqplot=0.11.5 nodejs=11.11.0 jupyterlab=0.35.4 \ | ||
ipywidgets=7.4.2 pytables mkl numexpr | ||
RUN source activate rapids \ | ||
&& pip install cython matplotlib networkx nxpd graphviz pudb | ||
RUN cd /rapids && source activate rapids \ | ||
&& conda install -c conda-forge bqplot nodejs \ | ||
&& conda install -y python-graphviz\ | ||
&& conda install -y tqdm \ | ||
&& conda install -y pytables \ | ||
&& conda install -y -f mkl \ | ||
&& conda install -y numpy scipy scikit-learn numexpr | ||
## && conda install -c nvidia -c rapidsai -c numba -c conda-forge -c defaults cudf=0.6 python=3.6 cudatoolkit=10.0 | ||
## && conda install -c rapidsai cudf \ | ||
## && conda install -c rapidsai cuml \ | ||
## && git clone https://github.com/rapidsai/cuml.git | ||
# | ||
# required set up | ||
# | ||
RUN jupyter labextension install @jupyter-widgets/[email protected] \ | ||
&& jupyter labextension install [email protected] \ | ||
&& mkdir /.local /.jupyter /.config /.cupy \ | ||
&& chmod 777 /.local /.jupyter /.config /.cupy | ||
RUN if [ "$VIM_INSTALL" = "Y" ] || [ "$VIM_INSTALL" = "y" ]; then /conda/envs/rapids/bin/jupyter labextension install [email protected] ; fi | ||
RUN source activate rapids \ | ||
&& /conda/envs/rapids/bin/jupyter labextension install @jupyter-widgets/jupyterlab-manager \ | ||
&& /conda/envs/rapids/bin/jupyter labextension install bqplot \ | ||
&& mkdir /.local \ | ||
&& chmod 777 /.local \ | ||
&& mkdir /.jupyter \ | ||
&& chmod 777 /.jupyter \ | ||
&& mkdir /.config \ | ||
&& chmod 777 /.config \ | ||
&& mkdir /.cupy \ | ||
&& chmod 777 /.cupy | ||
RUN source activate rapids \ | ||
&& pip install dask_labextension \ | ||
&& pip install sphinx sphinx_rtd_theme recommonmark numpydoc \ | ||
&& /conda/envs/rapids/bin/jupyter labextension install dask-labextension \ | ||
&& pip install cupy-cuda100 | ||
EXPOSE 8888 | ||
EXPOSE 8787 | ||
EXPOSE 8786 | ||
# the addon for vim editor | ||
# RUN source activate rapids \ | ||
# && /conda/envs/rapids/bin/jupyter labextension install jupyterlab_vim | ||
WORKDIR / | ||
EOF | ||
|
||
docker build -f $D_FILE -t $D_CONT . | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.