From 685abab023224c219982f1819ad98557b791631c Mon Sep 17 00:00:00 2001 From: Ryan Kraus Date: Wed, 23 Apr 2025 18:18:24 -0400 Subject: [PATCH 1/2] Cleaned up how the live-labs backend was getting installed. - Updated start_command in app 'Tutorial' - Added files: code/editor_test/file1.py, code/editor_test/file2.py - Deleted files: code/tutorial_app/requirements.txt - Modified files: apt.txt, postBuild.bash --- .project/spec.yaml | 2 +- apt.txt | 1 + code/tutorial_app/requirements.txt | 1 - postBuild.bash | 10 ++++++---- 4 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 code/tutorial_app/requirements.txt diff --git a/.project/spec.yaml b/.project/spec.yaml index fb3ceee..e80cd4b 100644 --- a/.project/spec.yaml +++ b/.project/spec.yaml @@ -136,7 +136,7 @@ execution: start_command: |- cd /project/code/tutorial_app && \ export PROXY_PREFIX && \ - .venv/bin/streamlit run app.py --server.baseUrlPath=$PROXY_PREFIX + streamlit run app.py --server.baseUrlPath=$PROXY_PREFIX health_check_command: curl -I http://localhost:8501 stop_command: | pkill -9 -f 'streamlit run app.py' diff --git a/apt.txt b/apt.txt index 4ff5186..76cd1b2 100644 --- a/apt.txt +++ b/apt.txt @@ -5,6 +5,7 @@ jq less make pandoc +pipx python3.10-venv skopeo unzip diff --git a/code/tutorial_app/requirements.txt b/code/tutorial_app/requirements.txt deleted file mode 100644 index bbd0508..0000000 --- a/code/tutorial_app/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../libs/live-labs \ No newline at end of file diff --git a/postBuild.bash b/postBuild.bash index b9604a5..1760672 100644 --- a/postBuild.bash +++ b/postBuild.bash @@ -23,6 +23,7 @@ sudo chmod ugo+x ngc-cli/ngc cat < /dev/null export PATH=\$PATH:/opt/ngc-cli EOM +cd - # custom python environment configuration cat < /dev/null @@ -39,10 +40,11 @@ fi EOM # setup the tutorial app -cd code/tutorial_app -python -m venv .venv -.venv/bin/pip install -r requirements.txt -ln -s $(pwd)/.venv/bin/streamlit ~/.local/bin/streamlit +cd /opt +sudo python3 -m venv live-labs +sudo ./live-labs/bin/pip install wheel +sudo ./live-labs/bin/pip install git+https://github.com/NVIDIA/nim-anywhere.git#subdirectory=libs/live-labs +sudo ln -s /opt/live-labs/bin/streamlit /home/workbench/.local/bin/streamlit # clean up sudo apt-get autoremove -y From 4522985a5e0665dc5da7514414f45e1592b62641 Mon Sep 17 00:00:00 2001 From: Ryan Kraus Date: Wed, 23 Apr 2025 22:33:54 +0000 Subject: [PATCH 2/2] added missing strings --- code/tutorial_app/pages/editor_test.en_US.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/tutorial_app/pages/editor_test.en_US.yaml b/code/tutorial_app/pages/editor_test.en_US.yaml index a82c183..21a0e5b 100644 --- a/code/tutorial_app/pages/editor_test.en_US.yaml +++ b/code/tutorial_app/pages/editor_test.en_US.yaml @@ -42,4 +42,5 @@ info_test_timeout: "Your code seems to be taking too long to run." # custom testing messages # if you add manual tests, you can add your own messages here -info_no_my_string: "Waiting for my string to be defined." +info_no_my_string: "`my_string` does not exist." +info_my_string_not_five: "`my_string` exists, but isn't set to the correct value."