Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Jan 16, 2024
1 parent c29dfb1 commit 62ca2e9
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 31 deletions.
18 changes: 15 additions & 3 deletions images/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
FROM rocker/geospatial
ENV NB_USER rstudio
ENV VIRTUAL_ENV /opt/venv

RUN /rocker_scripts/install_jupyter.sh

COPY requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt && rm requirements.txt
COPY install.R install.R
RUN Rscript install.R && rm install.R
RUN python3 -m ipykernel install --user --name=nasa

# some teaching preferences
RUN git config --global pull.rebase false


EXPOSE 8888
CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]

RUN chown -R root:staff ${VIRTUAL_ENV}
USER ${NB_USER}
COPY requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt && rm requirements.txt
RUN python3 -m ipykernel install --user --name=spatial


WORKDIR /home/${NB_USER}

74 changes: 46 additions & 28 deletions jupyterhub/public-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,57 @@ singleuser:
- display_name: "GPU Server"
description: "Spawns a notebook server with access to a GPU"
kubespawner_override:
extra_resource_limits:
image: ghcr.io/boettiger-lab/k8s:latest
extra_resource_limits:
nvidia.com/gpu: "1"
- display_name: "Rocker Geospatial with RStudio"
slug: rocker
description: R environment with many geospatial libraries pre-installed
profile_options: &profile_options
resource_allocation: &profile_options_resource_allocation
display_name: Resource Allocation
choices:
mem_1_9:
display_name: 2 GB RAM
kubespawner_override:
mem_guarantee: 1991341312
mem_limit: 1991341312
default: true
mem_7_4:
display_name: 7.4 GB RAM
kubespawner_override:
mem_guarantee: 7965365248
mem_limit: 7965365248
mem_14_8:
display_name: 14.8 GB RAM
kubespawner_override:
mem_guarantee: 15930730496
mem_limit: 15930730496
mem_29_7:
display_name: 29.7 GB RAM
kubespawner_override:
mem_guarantee: 31861460992
mem_limit: 31861460992
kubespawner_override:
profile_options: &profile_options
resource_allocation: &profile_options_resource_allocation
display_name: Resource Allocation
choices:
mem_1_9:
display_name: CPU only + 2 GB RAM
kubespawner_override:
mem_guarantee: 1991341312
mem_limit: 1991341312
default: true
mem_14_8:
display_name: CPU only + 14.8 GB RAM
kubespawner_override:
mem_guarantee: 15930730496
mem_limit: 15930730496
mem_29_7:
display_name: CPU only + 29.7 GB RAM
kubespawner_override:
mem_guarantee: 31861460992
mem_limit: 31861460992
gpu_1_9:
display_name: GPU + 2 GB RAM
kubespawner_override:
mem_guarantee: 1991341312
mem_limit: 1991341312
extra_resource_limits:
nvidia.com/gpu: "1"
gpu_14_8:
display_name: GPU + 14.8 GB RAM
kubespawner_override:
mem_guarantee: 15930730496
mem_limit: 15930730496
extra_resource_limits:
nvidia.com/gpu: "1"
gpu_29_7:
display_name: GPU + 29.7 GB RAM
kubespawner_override:
mem_guarantee: 31861460992
mem_limit: 31861460992
extra_resource_limits:
nvidia.com/gpu: "1"
kubespawner_override:
image: rocker/binder:4.3
default_url: /rstudio
# image: ghcr.io/boettiger-lab/k8s:latest
default_url: /lab # change to /rstudio to go straight to RStudio
working_dir: /home/rstudio
- display_name: "Bring your own image"
description: Specify your own docker image (must have python and jupyterhub installed in it)
Expand Down

0 comments on commit 62ca2e9

Please sign in to comment.