From 5b66e90a8850b1dda7a3b1c4037c5ebdfa757e99 Mon Sep 17 00:00:00 2001 From: Carl Date: Wed, 10 Jul 2024 20:09:02 -0700 Subject: [PATCH] ollama? --- images/Dockerfile.gpu | 19 ++++++++++++------- jupyterhub/thelio-config.yaml | 22 ++++++++++++---------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/images/Dockerfile.gpu b/images/Dockerfile.gpu index 1bfa01d..c428790 100644 --- a/images/Dockerfile.gpu +++ b/images/Dockerfile.gpu @@ -18,6 +18,11 @@ RUN apt-get update -qq && xargs sudo apt-get -y install < apt.txt RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache #RUN wget https://github.com/coder/code-server/releases/download/v4.89.1/code-server_4.89.1_amd64.deb && dpkg -i code-server*.deb && rm code-server*.deb +# ollama +RUN curl -fsSL https://ollama.com/install.sh | sh + + + # some preferences RUN git config --system pull.rebase false && \ git config --system credential.helper 'cache --timeout=30000' && \ @@ -29,19 +34,19 @@ WORKDIR /home/${NB_USER} RUN usermod -s /bin/bash ${NB_USER} COPY spatial-requirements.txt /tmp/spatial-requirements.txt -RUN python3 -m pip install --no-cache-dir -r /tmp/spatial-requirements.txt +RUN python3 -m pip install --no-cache-dir -r /tmp/spatial-requirements.txt && rm -rf /tmp/* COPY rl-requirements.txt /tmp/rl-requirements.txt -RUN python3 -m pip install --no-cache-dir -r /tmp/rl-requirements.txt +RUN python3 -m pip install --no-cache-dir -r /tmp/rl-requirements.txt && rm -rf /tmp/* COPY jupyter-requirements.txt /tmp/jupyter-requirements.txt -RUN python3 -m pip install --no-cache-dir -r /tmp/jupyter-requirements.txt +RUN python3 -m pip install --no-cache-dir -r /tmp/jupyter-requirements.txt && rm -rf /tmp/* ## Register the environment with ipykernel, mostly for vscode to find it RUN python3 -m ipykernel install --user --name=venv -# USER root -# COPY install.R /tmp/install.R -# RUN Rscript /tmp/install.R && rm /tmp/install.R && chown -R ${NB_USER}:staff ${R_HOME}/site-library -# USER ${NB_USER} +#USER root +#COPY install.R /tmp/install.R +#RUN Rscript /tmp/install.R && rm /tmp/install.R && chown -R ${NB_USER}:staff ${R_HOME}/site-library +#USER ${NB_USER} diff --git a/jupyterhub/thelio-config.yaml b/jupyterhub/thelio-config.yaml index d831055..9ad3ebf 100644 --- a/jupyterhub/thelio-config.yaml +++ b/jupyterhub/thelio-config.yaml @@ -28,13 +28,15 @@ singleuser: # - name: shm-volume # emptyDir: # medium: Memory -# extraFiles: -# remove-exporters: -# mountPath: /etc/jupyter/jupyter_notebook_config.py -# culling-config: -# data: -# ContentsManager: -# allow_hidden: true + extraFiles: + jupyter_server_config.json: + mountPath: /usr/local/etc/jupyter/jupyter_server_config.json + data: + # Allow JupyterLab to show the 'View -> Show Hidden Files' option + # in the menu. Defaults are not changed. + # https://github.com/jupyterlab/jupyterlab/issues/11304#issuecomment-945466766 + ContentsManager: + allow_hidden: true profileList: - display_name: "CPU" slug: rocker @@ -60,7 +62,7 @@ singleuser: mem_limit: 49861460992 default: true kubespawner_override: - image: "zcr.thelio.carlboettiger.info/boettiger-lab/k8s:latest" + image: "ghcr.io/boettiger-lab/k8s:latest" default_url: /lab # change to /rstudio to go straight to RStudio working_dir: /home/rstudio - display_name: "GPU" @@ -72,7 +74,7 @@ singleuser: profile_options: resource_allocation: *profile_options_resource_allocation kubespawner_override: - image: "zcr.thelio.carlboettiger.info/boettiger-lab/k8s-gpu:latest" + image: "ghcr.io/boettiger-lab/k8s-gpu:latest" default_url: /lab # change to /rstudio to go straight to RStudio working_dir: /home/rstudio - display_name: "NASA Image" @@ -81,7 +83,7 @@ singleuser: profile_options: resource_allocation: *profile_options_resource_allocation kubespawner_override: - image: "zcr.thelio.carlboettiger.info/boettiger-lab/nasa-tops:latest" + image: "ghcr.io/boettiger-lab/nasa-tops:latest" - display_name: "Bring your own image" description: Specify your own docker image (must have python and jupyterhub installed in it) slug: custom