Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create base image for JHubs #4

Open
1 of 3 tasks
eeholmes opened this issue Jan 17, 2024 · 2 comments
Open
1 of 3 tasks

Create base image for JHubs #4

eeholmes opened this issue Jan 17, 2024 · 2 comments

Comments

@eeholmes
Copy link
Member

eeholmes commented Jan 17, 2024

Goal: I am creating a base image for various hubs I will be setting up. Set-up needs to match other likely hub images that users might use (so common default JupyterHub images) and images should also work fine for other ways of using them (like binder but my image is kind of big so not really for binder). Some features of images I am trying to replicate

  • base image will have JLab, RStudio, VSCode but not be customized for geospatial
  • base image will have the basic apt packages that one expects
  • conda environment and the jupyter packages are in the "notebook" conda environment.
  • standard set of jupyterlab packages (extensions) that are found in the Openscapes image
  • base images uses rocker scripts

Where I am at

  • A simple Dockerfile with RStudio and jovyan as the user.
  • create a draft install_mamba.sh or install_conda.sh script. This would both install conda but also include the code needed to make RStudio recognize the activated conda environment.
  • update the base image to include conda notebook environment for jupyterlab as is standard/common for images designed for jupyterhubs.
@eeholmes
Copy link
Member Author

base

FROM rocker/rstudio:4.3 
ENV NB_USER jovyan
ENV VIRTUAL_ENV /opt/venv
ENV PATH $VIRTUAL_ENV/bin:$PATH
ENV SHELL=/bin/bash

RUN usermod -l ${NB_USER} -d /home/${NB_USER} ${DEFAULT_USER}
RUN /rocker_scripts/install_jupyter.sh
RUN chown -R root:staff ${VIRTUAL_ENV} && chmod -R ug+rw ${VIRTUAL_ENV}

USER ${NB_USER}
WORKDIR /home/${NB_USER}

EXPOSE 8888

CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--no-browser"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant