-
Notifications
You must be signed in to change notification settings - Fork 566
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 #174 from NVIDIA/security-analyst-digital-human
Security analyst digital human
- Loading branch information
Showing
104 changed files
with
28,112 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NGC_API_KEY="YOUR API KEY" | ||
|
||
EMBED_KEY=${NGC_API_KEY} | ||
RERANK_KEY=${NGC_API_KEY} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: morpheus | ||
channels: | ||
- rapidsai | ||
- nvidia | ||
- nvidia/label/dev # For pre-releases of MRC. Should still default to full releases if available | ||
- conda-forge | ||
dependencies: | ||
####### Morpheus Dependencies (keep sorted!) ####### | ||
- boto3 | ||
- dask | ||
- dill | ||
- distributed | ||
- kfp | ||
- librdkafka | ||
- mlflow>=2.10.0,<3 | ||
- nodejs=18.* | ||
- nvtabular=23.06 | ||
- papermill | ||
- s3fs>=2023.6 | ||
|
||
##### Pip Dependencies (keep sorted!) ####### | ||
- pip: | ||
- python-logging-loki |
101 changes: 101 additions & 0 deletions
101
community/digital-human-security-analyst/docker-compose.yml
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
version: '3.3' | ||
|
||
services: | ||
|
||
mlflow: | ||
restart: always | ||
build: ./mlflow | ||
image: mlflow_server | ||
container_name: mlflow_server_security_analyst | ||
ports: | ||
- "5000:5000" | ||
networks: | ||
- frontend | ||
- backend | ||
command: mlflow server --gunicorn-opts "--log-level debug" --backend-store-uri sqlite:////opt/mlflow/dbdata/mlflow.db --serve-artifacts --artifacts-destination /opt/mlflow/artifacts --host 0.0.0.0 | ||
# Run the container with this command to upgrade if needed: mlflow db upgrade sqlite:////opt/mlflow/dbdata/mlflow.db | ||
volumes: | ||
- db_data:/opt/mlflow/dbdata | ||
- mlflow_data:/opt/mlflow/artifacts | ||
|
||
# nim-llm: | ||
# image: nvcr.io/nim/meta/llama3-8b-instruct:1.0.0 | ||
# runtime: nvidia | ||
# ulimits: | ||
# memlock: -1 | ||
# stack: 67108864 | ||
# environment: | ||
# - NGC_API_KEY=${NGC_API_KEY} | ||
# - CUDA_VISIBLE_DEVICES=4 | ||
# ports: | ||
# - 8000:8000 | ||
# networks: | ||
# - frontend | ||
# - backend | ||
# volumes: | ||
# - type: bind | ||
# source: /raid/nim/cache | ||
# target: /nim/.cache | ||
|
||
jupyter: | ||
restart: always | ||
build: | ||
context: ./ | ||
dockerfile: ./docker/Dockerfile.morpheus | ||
args: | ||
- MORPHEUS_CONTAINER=${MORPHEUS_CONTAINER:-nvcr.io/nvidia/morpheus/morpheus} | ||
- MORPHEUS_CONTAINER_VERSION=${MORPHEUS_CONTAINER_VERSION:-v24.03.02-runtime} | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
device_ids: ['2'] | ||
capabilities: [gpu] | ||
image: morpheus_jupyter | ||
container_name: jupyter_security_analyst | ||
ports: | ||
- "8888:8888" | ||
networks: | ||
- frontend | ||
- backend | ||
command: jupyter-lab --no-browser --allow-root --ip='*' | ||
volumes: | ||
- .:/workspace/examples/digital_fingerprinting/production/morpheus | ||
depends_on: | ||
- mlflow | ||
# - nim-llm | ||
profiles: | ||
- dev | ||
cap_add: | ||
- sys_nice | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
environment: | ||
- OPENAI_API_KEY=${NGC_API_KEY} | ||
|
||
networks: | ||
frontend: | ||
driver: bridge | ||
backend: | ||
driver: bridge | ||
|
||
volumes: | ||
db_data: | ||
mlflow_data: |
21 changes: 21 additions & 0 deletions
21
community/digital-human-security-analyst/docker/Dockerfile.morpheus
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ARG MORPHEUS_CONTAINER=nvcr.io/nvidia/morpheus/morpheus | ||
ARG MORPHEUS_CONTAINER_VERSION=v24.03.00-runtime | ||
|
||
FROM ${MORPHEUS_CONTAINER}:${MORPHEUS_CONTAINER_VERSION} as base | ||
|
||
# Install the jupyter specific requirements | ||
RUN source activate morpheus \ | ||
&& mamba install -y -c conda-forge \ | ||
ipywidgets=8.0.7 \ | ||
nb_conda_kernels=2.3.1 \ | ||
&& pip install flask[async]==3.0.0 progress==1.6 \ | ||
graphviz==0.10 jupyterlab \ | ||
&& apt update \ | ||
&& apt install -y graphviz libgraphviz-dev \ | ||
&& conda clean -afy \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/workspace/docker/entrypoint.sh" ] | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
8 changes: 8 additions & 0 deletions
8
community/digital-human-security-analyst/docker/entrypoint.sh
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Activate "morpheus" conda environment | ||
. /opt/conda/etc/profile.d/conda.sh | ||
conda activate morpheus | ||
|
||
# Run whatever user wants | ||
exec "$@" |
2 changes: 2 additions & 0 deletions
2
community/digital-human-security-analyst/docker/start_jupyter.sh
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
nohup jupyter-lab --allow-root --ip=0.0.0.0 --port=8888 --no-browser --NotebookApp.token='' > /dev/null 2>&1 & |
32 changes: 32 additions & 0 deletions
32
community/digital-human-security-analyst/mlflow/Dockerfile
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM python:3.10-slim-buster | ||
|
||
# Install curl for health check | ||
RUN apt update && \ | ||
apt install -y --no-install-recommends \ | ||
curl libyaml-cpp-dev libyaml-dev && \ | ||
apt autoremove -y && \ | ||
apt clean all && \ | ||
rm -rf /var/cache/apt/* /var/lib/apt/lists/* | ||
|
||
# Install python packages | ||
RUN pip install "mlflow >=2.10.0,<3" boto3 pymysql pyyaml | ||
|
||
# We run on port 5000 | ||
EXPOSE 5000 | ||
|
||
HEALTHCHECK CMD curl -f http://localhost:5000/health || exit 1 |
Binary file added
BIN
+4.99 MB
...ity/digital-human-security-analyst/readme_media/analyst_morpheus_langchain_demo_small.mp4
Binary file not shown.
Binary file added
BIN
+595 KB
community/digital-human-security-analyst/readme_media/architecture_diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.85 MB
community/digital-human-security-analyst/readme_media/eye_blink_event_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.96 MB
community/digital-human-security-analyst/readme_media/eye_movement_event_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+924 KB
community/digital-human-security-analyst/readme_media/unreal_input_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
community/digital-human-security-analyst/workspace/dfp/__init__.py
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (c) 2022-2024, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
Empty file.
Oops, something went wrong.