Skip to content

Commit 1367a66

Browse files
committed
Use python 3.12 for nemo
1 parent f72ad76 commit 1367a66

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/nemo_jupyter/.devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
},
2626
"ghcr.io/dhoeric/features/google-cloud-cli@sha256:fa5d894718825c5ad8009ac8f2c9f0cea3d1661eb108a9d465cba9f3fc48965f": {},
2727
"./.devcontainer/features/workbench-tools": {
28+
"libPythonVersion": "3.12", // Must match python version in nemo image
2829
"cloud": "${templateOption:cloud}",
2930
"username": "jupyter",
3031
"userHomeDir": "/home/jupyter"

src/nemo_jupyter/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ RUN useradd --uid ${NB_UID} --gid ${NB_GID} --create-home --home-dir ${WORKDIR}
1717
# Fix ownership for common dirs
1818
&& mkdir -p /workspace \
1919
&& chown -R ${NB_UID}:${NB_GID} ${WORKDIR} /workspace /tmp \
20-
&& chown -R ${NB_UID}:${NB_GID} /opt/conda || true \
21-
# Add alias for weightsbiases
22-
&& printf 'alias weightsbiases="/usr/local/bin/wb"\nalias wb="/usr/bin/wb"\n' >> ${WORKDIR}/.bashrc
20+
&& chown -R ${NB_UID}:${NB_GID} /opt/conda || true
21+
22+
# Add shell functions to override wb commands (functions work in non-interactive shells, unlike aliases)
23+
RUN <<EOF cat >> ${WORKDIR}/.bashrc
24+
weightsbiases() { /usr/local/bin/wb "\$@"; }
25+
wb() { /usr/bin/wb "\$@"; }
26+
wandb() { /opt/venv/bin/wb "\$@"; }
27+
export -f weightsbiases wb wandb
28+
EOF
2329

2430
# Environment and working directory
2531
ENV HOME=${WORKDIR}

src/nemo_jupyter_aou/.devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"ghcr.io/dhoeric/features/google-cloud-cli@sha256:fa5d894718825c5ad8009ac8f2c9f0cea3d1661eb108a9d465cba9f3fc48965f": {},
2828
"./.devcontainer/features/workbench-tools": {
29+
"libPythonVersion": "3.12", // Must match python version in nemo image
2930
"cloud": "${templateOption:cloud}",
3031
"username": "jupyter",
3132
"userHomeDir": "/home/jupyter"

0 commit comments

Comments
 (0)