Skip to content

Commit

Permalink
Merge pull request #119 from NVIDIA/dev2.9
Browse files Browse the repository at this point in the history
Dev2.9
  • Loading branch information
bmwshop committed Jun 25, 2021
2 parents 406445c + 1b2e055 commit b8625cf
Show file tree
Hide file tree
Showing 24 changed files with 1,348 additions and 289 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cd data-science-stack
```

On Windows Subsystem for Linux (WSL):
_Note: This functionality is alpha only until WSL v2 becomes production ready_
_Note: This functionality is alpha only (and containers only) until WSL v2 becomes production ready_
Follow the [install instructions](https://docs.nvidia.com/cuda/wsl-user-guide/index.html) to install WSL v2 with CUDA support.
Then, create a a Ubuntu or RHEL VM, open a terminal, and follow OS-specific instructions above.

Expand All @@ -69,7 +69,7 @@ This creates and runs Jupyter in the container. Users can then connect
with the Jupyter notebook running at <http://localhost:8888/>
Control-C to exit.

To mount data or code into your contianer, see
To mount data or code into your container, see
[How do I mount data into containers?](#How-do-i-mount-data-into-containers)
below.

Expand Down Expand Up @@ -195,10 +195,12 @@ Customer Portal using Red Hat Subscription-Manager for further information -
<https://access.redhat.com/solutions/253273>
### Windows Subsystem for Linux (WSL v2)
_Note: This functionality is alpha only until WSL v2 becomes production ready_
_Note: This functionality is alpha only (and containers only) until WSL v2 becomes production ready_
Follow the [install instructions](https://docs.nvidia.com/cuda/wsl-user-guide/index.html) for WSL v2 with CUDA support.
Then, create a a Ubuntu or RHEL VM, open a terminal, and follow OS-specific instructions above.
Then, create a Ubuntu or RHEL VM, open a terminal, and follow OS-specific instructions above.
_Note: WSL v2 currently requires CUDA 11.0, while data science stack 2.9.0 is based on CUDA 11.2. Therefore, WSL v2 is supported via containers only.
## Installing the NVIDIA GPU Driver
Expand Down
43 changes: 27 additions & 16 deletions data-science-stack
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.

# Global Paramaters
STACK_VERSION=2.8.0
NOTEBOOKS_VERSION=0.18
STACK_VERSION=2.9.0
NOTEBOOKS_VERSION=21.06

MIN_DRIVER=460.39
MIN_CUDA=11.0.228
MIN_DRIVER=465.27
MIN_CUDA=11.2.152
MIN_DOCKER=20.10.3
MIN_CONDA=4.8.3

Expand Down Expand Up @@ -216,13 +216,13 @@ EOF
sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install nvidia-driver-460
sudo apt-get -y install nvidia-driver-465
sudo apt-get -y autoremove
REBOOT=1
elif [ $OS_FLAVOR$OS_RELEASE_MAJOR = "rhel8" ]; then
sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
sudo dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)
sudo dnf -y module install nvidia-driver:460-dkms
sudo dnf -y module install nvidia-driver:465-dkms
# REBOOT not necessary
else
nvlog "Automated NVIDIA driver install on $OS_FLAVOR $OS_RELEASE_FULL is not supported."
Expand Down Expand Up @@ -285,7 +285,9 @@ EOF


detect_cuda () {
if [ -f /usr/local/cuda/version.txt ]; then
if [ -f /usr/local/cuda/version.json ]; then
CUDA_VER=$(jq -r ".cuda.version" /usr/local/cuda/version.json 2>/dev/null)
elif [ -f /usr/local/cuda/version.txt ]; then
CUDA_VER=$(cat /usr/local/cuda/version.txt | awk '{ print $3 }' 2> /dev/null)
if [ $? -ne 0 ]; then
CUDA_VER=0
Expand Down Expand Up @@ -315,31 +317,31 @@ install_cuda () {
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda-toolkit-11-0
sudo apt-get -y install cuda-toolkit-11-2
else
curl https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin \
-o cuda.pin
sudo mv cuda.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda-toolkit-11-0
sudo apt-get -y install cuda-toolkit-11-2
fi
else
if [ $OS_FLAVOR$OS_RELEASE_MAJOR = "rhel7" ]; then
sudo yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
sudo yum clean all
sudo yum install -y cuda-toolkit-11-0
sudo yum install -y cuda-toolkit-11-2
else
sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
sudo dnf clean all
sudo dnf -y install cuda-toolkit-11-0
sudo dnf -y install cuda-toolkit-11-2
fi
fi
set +e

echo "export PATH=/usr/local/cuda/bin/:\$PATH # DATA-SCIENCE-STACK-ADDED" >> ${HOME}/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-11.0/lib64:/lib:\$LD_LIBRARY_PATH # DATA-SCIENCE-STACK-ADDED" >> ${HOME}/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64:/lib:\$LD_LIBRARY_PATH # DATA-SCIENCE-STACK-ADDED" >> ${HOME}/.bashrc
source ${HOME}/.bashrc

nvlog "END Installing CUDA"
Expand Down Expand Up @@ -464,7 +466,8 @@ install_docker () {

sudo yum install -y \
docker-ce \
nvidia-container-toolkit
nvidia-container-toolkit \
iptables
sudo systemctl enable docker
if [ "$WSL" = true ]
then
Expand Down Expand Up @@ -633,8 +636,7 @@ create_conda_env () {
jupyter labextension install -y --clean \
@jupyter-widgets/jupyterlab-manager \
jupyter-threejs \
dask-labextension \
jupyterlab-nvdashboard
dask-labextension

nvlog "END Setup Conda Env"
nvlog "Next you can run: ${SCRIPT_NAME} run-jupyter"
Expand Down Expand Up @@ -1370,8 +1372,17 @@ case "$1" in
run-notebook)
if [ $# -ne 2 ]; then
nvlog "Usage: ${SCRIPT_NAME} run-notebook <notebook-file>"
else
if [ ! -f "$2" ]; then
nvlog "Notebook $2 not found"
else
if [ $CONDA_VER != "0" ];then
run_notebook $2
else
nvlog "Conda not detected. Please run create-conda-env first"
fi
fi
fi;
run_notebook $2
;;

run-notebook-dir)
Expand Down
9 changes: 4 additions & 5 deletions data-science-stack.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.

ARG DOCKER_REPO=nvcr.io/nvidia/cuda
ARG CUDA_VERSION=11.0
ARG CUDA_VERSION=11.2.2
ARG OS_FLAVOR=devel-ubuntu20.04
FROM ${DOCKER_REPO}:${CUDA_VERSION}-${OS_FLAVOR}

Expand Down Expand Up @@ -32,9 +32,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -y --fix-missing \

# Create Base environment

ARG STACK_VERSION=2.8.0
ARG STACK_VERSION=2.9.0
ARG CONDA_VERSION=4.8.3
ARG NOTEBOOKS_VERSION=0.18
ARG NOTEBOOKS_VERSION=21.06

ENV CONDA_ROOT=/conda
ENV NOTEBOOKS_DIR=/notebooks
Expand Down Expand Up @@ -68,8 +68,7 @@ RUN ${CONDA_ROOT}/bin/conda env create -n data-science-stack-${STACK_VERSION} \
jupyter labextension install -y --clean \
@jupyter-widgets/jupyterlab-manager \
jupyter-threejs \
dask-labextension \
jupyterlab-nvdashboard' \
dask-labextension' \
&& ${CONDA_ROOT}/bin/conda clean -afy \
&& find ${CONDA_ROOT} -follow -type f -name '*.pyc' -delete \
&& find ${CONDA_ROOT} -follow -type f -name '*.js.map' -delete
Expand Down
4 changes: 2 additions & 2 deletions environments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ that library versions will change over time.

## Problems while pinning

Satisfying the constraings in your .env file may not be possible, in which
Satisfying the constraints in your .env file may not be possible, in which
case the pin command will fail.

To make this (very common) problem easier to solve, the command to generate
Expand All @@ -31,7 +31,7 @@ including what constraints cannot be satisfied.
The file is part of the command used by the `data-science-stack` script to
generate pinned configurations.
The file should contain only the channels and packages, one per line.
Packages with version restictions should have double quotes around them.
Packages with version restrictions should have double quotes around them.

-c channel-1
-c channel-2
Expand Down

0 comments on commit b8625cf

Please sign in to comment.