Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update jupyter in the OOD demo #205

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ondemand/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ why it's not directly in the shell scripts `PATH`.
We need to add this line to our job's shell script to enable it.

```shell
source /usr/local/jupyter/2.1.4/bin/activate
source /usr/local/jupyter/4.3.5/bin/activate
```

So let's [open the template/script.sh.erb in the file editor](https://localhost:3443/pun/sys/file-editor/edit/home/hpcadmin/ondemand/dev/jupyter/template/script.sh.erb)
Expand All @@ -643,7 +643,7 @@ Lines 24 - 31 of `template/script.sh.erb` should now look like this.
# Benchmark info
echo "TIMING - Starting jupyter at: $(date)"

source /usr/local/jupyter/2.1.4/bin/activate
source /usr/local/jupyter/4.3.5/bin/activate

# Launch the Jupyter Notebook Server
set -x
Expand Down Expand Up @@ -1109,7 +1109,7 @@ cd "${HOME}"
# Benchmark info
echo "TIMING - Starting jupyter at: $(date)"

source /usr/local/jupyter/2.1.4/bin/activate
source /usr/local/jupyter/4.3.5/bin/activate

# Launch the Jupyter Notebook Server
set -x
Expand Down
4 changes: 2 additions & 2 deletions ondemand/jupyter/template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ cd "${HOME}"
# Start Jupyter Notebook Server
#

source /usr/local/jupyter/2.1.4/bin/activate
source /usr/local/jupyter/4.3.5/bin/activate

# Benchmark info
echo "TIMING - Starting jupyter at: $(date)"

# Launch the Jupyter Notebook Server
set -x
jupyter notebook --config="${CONFIG_FILE}" <%= context.extra_jupyter_args %>
jupyter lab --config="${CONFIG_FILE}" <%= context.extra_jupyter_args %>
8 changes: 5 additions & 3 deletions slurm/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ echo -e "# Disable Avahi (since it does not run inside the containers)\n-A" >> /
log_info "Configuring PCP logger with suitable container defaults.."
sed -i 's#^LOCALHOSTNAME.*$#LOCALHOSTNAME y n "/home/pcp/$(date +%Y)/$(date +%m)/LOCALHOSTNAME/$(date +%Y)-$(date +%m)-$(date +%d)" -r -c /etc/pcp/pmlogger/pmlogger-supremm.config#' /etc/pcp/pmlogger/control.d/local

export JUPYTER_VERSION=4.3.5

log_info "Installing Jupyter.."
python3 -m venv /usr/local/jupyter/2.1.4 --prompt jupyter/2.1.4
source /usr/local/jupyter/2.1.4/bin/activate
pip install jupyterlab==2.1.4 jupyter-console qtconsole ipywidgets plotly==4.8.2 pandas scikit-learn numpy
python3 -m venv /usr/local/jupyter/$JUPYTER_VERSION --prompt jupyter/$JUPYTER_VERSION
source /usr/local/jupyter/$JUPYTER_VERSION/bin/activate
pip install jupyterlab==$JUPYTER_VERSION jupyter-console qtconsole ipywidgets plotly pandas scikit-learn numpy
deactivate

dnf clean all
Expand Down