Skip to content
This repository was archived by the owner on May 19, 2023. It is now read-only.

Commit 05686eb

Browse files
authored
Add transformers dependency and update notebooks (#486)
Added missing dependencies and updated broken notebooks. Authors: - https://github.com/bsuryadevara - https://github.com/bsuryadev Approvers: - Tad ZeMicheal (https://github.com/tzemicheal) - Eli Fajardo (https://github.com/efajardo-nv) - https://github.com/gbatmaz - AJ Schmidt (https://github.com/ajschmidt8) URL: #486
1 parent 1900906 commit 05686eb

File tree

9 files changed

+397
-211
lines changed

9 files changed

+397
-211
lines changed

CONTRIBUTING.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@ run each time you commit changes.
115115

116116
### Build from Source
117117

118-
The following instructions are for developers and contributors to CLX OSS development. These instructions are tested on Linux Ubuntu 16.04 & 18.04. Use these instructions to build CLX from source and contribute to its development. Other operating systems may be compatible, but are not currently tested.
118+
The following instructions are for developers and contributors to CLX OSS development. These instructions are tested on Linux Ubuntu 18.04 & 20.04. Use these instructions to build CLX from source and contribute to its development. Other operating systems may be compatible, but are not currently tested.
119119

120120
The following instructions are tested on Linux systems.
121121

122122
#### Prerequisites
123123

124124
CUDA requirement:
125125

126-
* CUDA 11.0
127-
* NVIDIA driver 396.44+
126+
* CUDA 11.5
127+
* NVIDIA driver 470.82+
128128
* Pascal architecture or better
129129

130130
You can obtain CUDA from [https://developer.nvidia.com/cuda-downloads](https://developer.nvidia.com/cuda-downloads).
@@ -146,8 +146,7 @@ Create the conda development environment:
146146
```bash
147147
# create the conda environment (assuming in base `clx` directory)
148148

149-
conda env create --name clx_dev --file conda/environments/clx_dev_cuda11.0.yml
150-
149+
mamba env create --name clx_dev --file conda/environments/clx_dev_cuda11.5.yml
151150

152151
# activate the environment
153152
conda activate clx_dev
@@ -159,7 +158,7 @@ conda deactivate
159158
The environment can be updated as development includes/changes the dependencies. To do so, run:
160159

161160
```bash
162-
conda env update --name clx_dev --file conda/environments/clx_dev_cuda11.0.yml
161+
mamba env update --name clx_dev --file conda/environments/clx_dev_cuda11.5.yml
163162

164163
conda activate clx_dev
165164
```
@@ -176,4 +175,4 @@ $ python setup.py install
176175
Python API documentation can be generated from [docs](docs) directory.
177176

178177
## Attribution
179-
Portions adopted from https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md
178+
Portions adopted from https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md

Dockerfile

+19-12
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
# An integration test & dev container which builds and installs CLX from default branch
2-
ARG RAPIDS_VERSION=21.06
3-
ARG CUDA_VERSION=10.1
2+
ARG RAPIDS_VERSION=22.06
3+
ARG CUDA_VERSION=11.5
44
ARG CUDA_SHORT_VERSION=${CUDA_VERSION}
55
ARG LINUX_VERSION=ubuntu18.04
6-
ARG PYTHON_VERSION=3.7
6+
ARG PYTHON_VERSION=3.8
77
FROM rapidsai/rapidsai-dev-nightly:${RAPIDS_VERSION}-cuda${CUDA_VERSION}-devel-${LINUX_VERSION}-py${PYTHON_VERSION}
88

99
# Add everything from the local build context
1010
ADD . /rapids/clx/
1111
RUN chmod -R ugo+w /rapids/clx/
1212

13-
RUN apt update -y --fix-missing && \
14-
apt upgrade -y && \
15-
apt install -y krb5-user
16-
1713
RUN source activate rapids && \
18-
conda install -c pytorch "pytorch=1.7.1" torchvision "cudf_kafka=${RAPIDS_VERSION}" "custreamz=${RAPIDS_VERSION}" "scikit-learn>=0.21" "nodejs>=12" ipywidgets python-confluent-kafka "transformers=4.*" "seqeval=0.0.12" python-whois seaborn requests matplotlib pytest jupyterlab && \
14+
gpuci_mamba_retry install -y -n rapids \
15+
"cudf_kafka=${RAPIDS_VER}" \
16+
"custreamz=${RAPIDS_VER}" \
17+
scikit-learn>=0.21 \
18+
nodejs>=12 \
19+
ipywidgets \
20+
python-confluent-kafka \
21+
seqeval \
22+
python-whois \
23+
seaborn \
24+
requests \
25+
matplotlib \
26+
pytest \
27+
jupyterlab=3.0 \
28+
faker && \
29+
pip install -U torch==1.11.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html && \
1930
pip install "git+https://github.com/rapidsai/cudatashader.git" && \
2031
pip install mockito && \
2132
pip install wget && \
2233
pip install "git+https://github.com/slashnext/SlashNext-URL-Analysis-and-Enrichment.git#egg=slashnext-phishing-ir&subdirectory=Python SDK/src"
23-
24-
RUN source activate rapids \
25-
&& conda install -n rapids jupyterlab-nvdashboard \
26-
&& jupyter labextension install @jupyter-widgets/jupyterlab-manager dask-labextension jupyterlab-nvdashboard
2734

2835
# clx build/install
2936
RUN source activate rapids && \

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Please see the [Demo Docker Repository](https://hub.docker.com/r/rapidsai/rapids
3333
Pull image:
3434

3535
```sh
36-
docker pull rapidsai/rapidsai-clx:21.06-cuda11.0-runtime-ubuntu18.04-py3.7
36+
docker pull rapidsai/rapidsai-clx:22.04-cuda11.5-runtime-ubuntu18.04-py3.8
3737
```
3838

3939
Nightly images for current development version can be pulled from https://hub.docker.com/r/rapidsai/rapidsai-clx-nightly.
@@ -46,7 +46,7 @@ docker run -it --gpus '"device=0"' \
4646
-p 8888:8888 \
4747
-p 8787:8787 \
4848
-p 8686:8686 \
49-
rapidsai/rapidsai-clx:21.06-cuda11.0-runtime-ubuntu18.04-py3.7
49+
rapidsai/rapidsai-clx:22.04-cuda11.5-runtime-ubuntu18.04-py3.8
5050
```
5151

5252
##### Legacy - Docker CE v18 and nvidia-docker2
@@ -56,7 +56,7 @@ docker run -it --runtime=nvidia \
5656
-p 8888:8888 \
5757
-p 8787:8787 \
5858
-p 8686:8686 \
59-
rapidsai/rapidsai-clx:21.06-cuda11.0-runtime-ubuntu18.04-py3.7
59+
rapidsai/rapidsai-clx:22.04-cuda11.5-runtime-ubuntu18.04-py3.8
6060
```
6161

6262
#### Container Ports
@@ -73,15 +73,15 @@ The following ports are used by the **runtime containers only** (not base contai
7373
Prerequisites
7474

7575
* NVIDIA Pascal™ GPU architecture or better
76-
* CUDA 11.0 compatible NVIDIA driver
77-
* Ubuntu 16.04/18.04 or CentOS 7
76+
* CUDA 11.5+ compatible NVIDIA driver
77+
* Ubuntu 18.04/20.04 or CentOS 7
7878
* Docker CE v18+
7979
* nvidia-docker v2+
8080

8181
Pull the RAPIDS image suitable to your environment and build CLX image. Please see the [rapidsai-dev](https://hub.docker.com/r/rapidsai/rapidsai-dev) or [rapidsai-dev-nightly](https://hub.docker.com/r/rapidsai/rapidsai-dev-nightly) Docker repositories, choosing a tag based on the NVIDIA CUDA version you’re running. More information on getting started with RAPIDS can be found [here](https://rapids.ai/start.html).
8282

8383
```sh
84-
docker pull rapidsai/rapidsai-dev:21.06-cuda11.0-devel-ubuntu18.04-py3.7
84+
docker pull rapidsai/rapidsai-dev:22.04-cuda11.5-devel-ubuntu18.04-py3.8
8585
docker build -t clx:latest .
8686
```
8787

ci/gpu/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ gpuci_logger "Activate conda env"
3939
. /opt/conda/etc/profile.d/conda.sh
4040
conda activate rapids
4141

42-
gpuci_logger "Install tests dependencies"
42+
gpuci_logger "Install conda dependencies"
4343
gpuci_mamba_retry install -y \
4444
"cuxfilter=${MINOR_VERSION}" \
4545
"faker" \

conda/environments/clx_dev_cuda11.0.yml conda/environments/clx_dev_cuda11.5.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ name: clx_dev
22
channels:
33
- rapidsai
44
- rapidsai-nightly
5-
- pytorch
65
- conda-forge
76
dependencies:
8-
- cudatoolkit=11.0
7+
- cudatoolkit=11.5
98
- python>=3.6,<3.9
10-
- pytorch=1.7.1
119
- cugraph=22.06.*
1210
- cuml=22.06.*
1311
- cuxfilter=22.06.*
@@ -35,3 +33,4 @@ dependencies:
3533
- "git+https://github.com/slashnext/SlashNext-URL-Analysis-and-Enrichment.git#egg=slashnext-phishing-ir&subdirectory=Python SDK/src"
3634
- wget
3735
- mockito
36+
- torch==1.11.0

notebooks/anomalous_behavior_profiling/anomalous_behavior_profiling_supervised.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
},
4242
{
4343
"cell_type": "code",
44-
"execution_count": 1,
44+
"execution_count": 3,
4545
"metadata": {},
4646
"outputs": [],
4747
"source": [
4848
"import xgboost as xgb\n",
4949
"import cudf\n",
50-
"from cuml.preprocessing.model_selection import train_test_split\n",
50+
"from cuml.model_selection import train_test_split\n",
5151
"from cuml import ForestInference\n",
5252
"import sklearn.datasets\n",
5353
"import cupy"
@@ -379,7 +379,7 @@
379379
],
380380
"metadata": {
381381
"kernelspec": {
382-
"display_name": "Python 3",
382+
"display_name": "Python 3 (ipykernel)",
383383
"language": "python",
384384
"name": "python3"
385385
},
@@ -393,7 +393,7 @@
393393
"name": "python",
394394
"nbconvert_exporter": "python",
395395
"pygments_lexer": "ipython3",
396-
"version": "3.8.8"
396+
"version": "3.8.13"
397397
}
398398
},
399399
"nbformat": 4,

notebooks/ids_detection/IDS_using_LODA.ipynb

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
"cell_type": "markdown",
4141
"metadata": {},
4242
"source": [
43-
"#### Load and preprocess dataset"
43+
"#### Load and preprocess dataset\n",
44+
"\n",
45+
"Download `GeneratedLabelledFlows.zip` from the above link and extract all files in a selected path."
4446
]
4547
},
4648
{
@@ -481,7 +483,7 @@
481483
],
482484
"metadata": {
483485
"kernelspec": {
484-
"display_name": "Python 3",
486+
"display_name": "Python 3 (ipykernel)",
485487
"language": "python",
486488
"name": "python3"
487489
},
@@ -495,7 +497,7 @@
495497
"name": "python",
496498
"nbconvert_exporter": "python",
497499
"pygments_lexer": "ipython3",
498-
"version": "3.8.8"
500+
"version": "3.8.13"
499501
},
500502
"toc-autonumbering": false,
501503
"toc-showcode": true,

0 commit comments

Comments
 (0)