Skip to content

Commit

Permalink
ollama?
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Jul 11, 2024
1 parent 3a9e996 commit 5b66e90
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
19 changes: 12 additions & 7 deletions images/Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -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' && \
Expand All @@ -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}


22 changes: 12 additions & 10 deletions jupyterhub/thelio-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 5b66e90

Please sign in to comment.