diff --git a/.gitignore b/.gitignore index b9d937c..5895201 100644 --- a/.gitignore +++ b/.gitignore @@ -181,3 +181,18 @@ cython_debug/ # Operating System files **/.Trash* secrets.env + +# Ignore generated or temporary files managed by the Workbench +!.project/configpacks + +# General ignores +.DS_Store + +# Temp directories, notebooks created by jupyterlab +.Trash-*/ +.jupyter/ +.local/ + +# Python distribution / packaging + +# Workbench Project Layout \ No newline at end of file diff --git a/.project/brev.nvwb-startup.sh b/.project/brev.nvwb-startup.sh new file mode 100644 index 0000000..f0e3962 --- /dev/null +++ b/.project/brev.nvwb-startup.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +sudo -i -u ubuntu bash << 'EOF' +# Download NVIDIA AI Workbench +mkdir -p $HOME/.nvwb/bin +curl -L https://workbench.download.nvidia.com/stable/workbench-cli/$(curl -L -s https://workbench.download.nvidia.com/stable/workbench-cli/LATEST)/nvwb-cli-$(uname)-$(uname -m) --output $HOME/.nvwb/bin/nvwb-cli +chmod +x $HOME/.nvwb/bin/nvwb-cli +ln -sf $HOME/.nvwb/bin/nvwb-cli $HOME/.nvwb/bin/nvwb + +# Install NVIDIA AI Workbench +sudo $HOME/.nvwb/bin/nvwb-cli install --noninteractive --accept --docker --drivers --uid 1000 --gid 1000 +export PATH="$HOME/.nvwb/bin:$PATH" + +# Clone and build workshop +nvwb activate local +nvwb clone project https://github.com/nv-edwli/workshop-build-an-agent --context local +EOF \ No newline at end of file diff --git a/.project/configpacks b/.project/configpacks new file mode 100644 index 0000000..f7247e3 --- /dev/null +++ b/.project/configpacks @@ -0,0 +1,10 @@ +*defaults.ContainerUser +*bash.PreBuild +*defaults.EnvVars +*defaults.Readme +*defaults.Entrypoint +*apt.PackageManager +*bash.PreLanguage +*python.PipPackageManager +*bash.PostBuild +*jupyterlab.JupyterLab \ No newline at end of file diff --git a/.project/spec.yaml b/.project/spec.yaml index 1aea507..dcc1b21 100644 --- a/.project/spec.yaml +++ b/.project/spec.yaml @@ -17,19 +17,19 @@ layout: environment: base: registry: nvcr.io - image: nvidia/rapidsai/notebooks:25.04-cuda12.8-py3.12 + image: nvidia/rapidsai/notebooks:24.08-cuda12.2-py3.11 build_timestamp: "" name: RAPIDS with CUDA supported_architectures: [] cuda_version: "" - description: "" + description: A RAPIDS base with CUDA entrypoint_script: /home/rapids/entrypoint.sh labels: [] apps: - - name: jupyterlab + - name: DevX-Lab type: jupyterlab class: webapp - start_command: jupyter lab --allow-root --port 8888 --ip 0.0.0.0 --no-browser --NotebookApp.base_url=$PROXY_PREFIX --NotebookApp.default_url=/lab --NotebookApp.allow_origin='*' + start_command: jupyter lab --allow-root --port 8888 --ip 0.0.0.0 --no-browser --NotebookApp.base_url=$PROXY_PREFIX --NotebookApp.default_url=/lab --NotebookApp.allow_origin='*' --expose-app-in-browser health_check_command: '[ \$(echo url=\$(jupyter lab list | head -n 2 | tail -n 1 | cut -f1 -d'' '' | grep -v ''Currently'' | sed "s@/?@/lab?@g") | curl -o /dev/null -s -w ''%{http_code}'' --config -) == ''200'' ]' stop_command: jupyter lab stop 8888 user_msg: "" @@ -51,8 +51,8 @@ environment: os_distro_release: "24.04" schema_version: "" user_info: - uid: "1000" - gid: "1001" + uid: "1001" + gid: "1000" username: rapids package_managers: - name: apt @@ -78,32 +78,18 @@ environment: target: /opt/conda compose_file_path: "" execution: - apps: - - name: devx-lab - type: jupyterlab - class: webapp - start_command: jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --ServerApp.token='' --ServerApp.password_required=False --expose-app-in-browser --NotebookApp.allow_origin='*' --NotebookApp.base_url=$PROXY_PREFIX --NotebookApp.default_url=/lab --allow-root - health_check_command: curl -f http://localhost:8888/api || exit 1 - stop_command: jupyter lab stop 8888 - user_msg: "" - logfile_path: "" - timeout_seconds: 60 - icon_url: "" - webapp_options: - autolaunch: true - port: "8888" - proxy: - trim_prefix: false - url: http://localhost:8888/lab + apps: [] resources: gpu: requested: 0 sharedMemoryMB: 0 - secrets: - - variable: NGC_API_KEY - description: NGC Personal Key from https://org.ngc.nvidia.com/setup/personal-keys + secrets: [] mounts: - type: project - target: /project + target: /project/ description: Project directory options: rw + - type: volume + target: /nvwb-shared-volume/ + description: "" + options: volumeName=nvwb-shared-volume diff --git a/assets/.gitkeep b/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/preBuild.bash b/preBuild.bash index fe374f5..99d7460 100644 --- a/preBuild.bash +++ b/preBuild.bash @@ -1,2 +1,2 @@ # join the rapids group for access to python env -sudo usermod -aG 1001 $(whoami) +# sudo usermod -aG 1001 $(whoami) diff --git a/requirements.txt b/requirements.txt index 6b86f88..31b2fe5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -jupyterlab>=4.4.3 +jupyterlab>3.0 jupyterlab-git>=0.44.0 jupyter-app-launcher>=0.1.0 dotenv~=0.9.9