Skip to content

Commit

Permalink
Add Dask configuration file and enable Dask
Browse files Browse the repository at this point in the history
Labextension
  • Loading branch information
ivukotic committed Nov 15, 2023
1 parent 3d2d436 commit 1ce8b7e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ RUN mkdir /workspace
# c.f. https://docs.jupyter.org/en/latest/use/jupyter-directories.html#configuration-files
COPY private_jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py

COPY dask_config.yaml /etc/dask/dask_config.yaml

RUN . /release_setup.sh \
&& /venv/bin/jupyter server extension enable --py jupyterlab --sys-prefix

Expand Down
12 changes: 2 additions & 10 deletions SetupPrivateJupyterLab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,14 @@ if [ "$OWNER" != "" ] && [ "$CONNECT_GROUP" != "" ]; then
cd /home/$OWNER

chown -R $OWNER: /venv

# # get tutorial in.
# cp -r /ML_platform_tests/tutorial ~/.

# # setup ROOT
# cd /opt/root/
# source bin/thisroot.sh
# cp -r $ROOTSYS/etc/notebook/kernels/root /usr/local/share/jupyter/kernels/

# python3.8 -m pip --no-cache-dir install root-pandas

unset JUPYTER_PATH
which jupyter
unset JUPYTER_CONFIG_DIR
ls /root/.jupyter/jupyter_notebook_config.py
cd /home/$OWNER

jupyter serverextension enable --py --sys-prefix dask_labextension

# Invoke Jupyter lab as the user
su $OWNER -c "jupyter lab --ServerApp.root_dir=/home/${OWNER} --ServerApp.port=9999 --ServerApp.ip='0.0.0.0' --no-browser --config=/root/.jupyter/jupyter_notebook_config.py"
Expand Down
12 changes: 12 additions & 0 deletions dask_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
labextension:
factory:
module: dask_kubernetes
class: KubeCluster
args: []
kwargs: {}
default:
workers: 3
adapt:
minimum: 0
maximum: 100
initial: []

0 comments on commit 1ce8b7e

Please sign in to comment.