diff --git a/Dockerfile b/Dockerfile index 58ea72e..ca5d58c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN mkdir -p /pyrocket_scripts && \ RUN /pyrocket_scripts/install-conda-packages.sh ${REPO_DIR}/environment.yml # Install R, RStudio via Rocker scripts. Requires the prefix for a rocker Dockerfile -# RUN /pyrocket_scripts/install-rocker.sh "verse_${R_VERSION}" +RUN /pyrocket_scripts/install-rocker.sh "verse_${R_VERSION}" # Install extra apt packages # Install linux packages after R installation since the R install scripts get rid of packages diff --git a/README.md b/README.md index 6dbd15b..a0c6467 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build and push container image](https://github.com/nmfs-opensci/py-rocket-base/actions/workflows/build.yaml/badge.svg)](https://github.com/nmfs-opensci/py-rocket-base/actions/workflows/build.yaml)[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13942617.svg)](https://doi.org/10.5281/zenodo.13942617)[![GitHub Release](https://img.shields.io/github/v/release/nmfs-opensci/py-rocket-base)](https://github.com/nmfs-opensci/py-rocket-base/releases) -The py-rocket-base image is a base image for the JupyterHubs with Python and RStudio. The py-rocket-base image is designed to install the Jupyter and JupyterHub environment with [repo2docker](https://repo2docker.readthedocs.io) and the R environment with [Rocker](https://rocker-project.org/) installation scripts. You can scroll through the Rocker [installation scripts](https://github.com/rocker-org/rocker-versioned2/blob/master/scripts/install_rstudio.sh) to see how the environment is set up. +The py-rocket-base image is a base image for the JupyterHubs with Python and RStudio. The py-rocket-base image uses the [Pangeo base-image](https://github.com/pangeo-data/pangeo-docker-images/tree/master/base-image) (minus the `ONBUILD` commands) as the base image (stored in `py-rocket-base/base-image`) and the [pangeo-notebook metapackage](https://github.com/conda-forge/pangeo-notebook-feedstock/blob/main/recipe/meta.yaml) to setup the core JupyterHub environment (following [Pangeo base-notebook](https://github.com/pangeo-data/pangeo-docker-images/blob/master/base-notebook/environment.yml). [Additional Python packages](https://github.com/nmfs-opensci/py-rocket-base/blob/main/environment.yml) are installed to provide a fuller JupyterLab, RStudio, Desktop, and VSCode environment. The R environment is installed with [Rocker](https://rocker-project.org/) installation scripts. You can scroll through the Rocker [installation scripts](https://github.com/rocker-org/rocker-versioned2/blob/master/scripts/install_rstudio.sh) to see how that environment is set up. image url ``` diff --git a/scripts/install-desktop.sh b/scripts/install-desktop.sh index 0fa1882..90f6625 100644 --- a/scripts/install-desktop.sh +++ b/scripts/install-desktop.sh @@ -1,5 +1,6 @@ #!/bin/bash # Required User: root +# Usage: RUN /pyrocket_scripts/setup-desktop.sh " echo "Running setup-desktop.sh" @@ -43,13 +44,13 @@ else fi # Check if desktop.sh exists before executing -if [ -f "${REPO_DIR}/desktop.sh" ]; then - echo " Running ${REPO_DIR}/desktop.sh to move Desktop files to appropriate directories and register as applications." - chmod +x "${REPO_DIR}/desktop.sh" - "${REPO_DIR}/desktop.sh" +if [ -f "${REPO_DIR}/scripts/setup-desktop.sh" ]; then + echo " Running ${REPO_DIR}/scripts/setup-desktop.sh to move Desktop files to appropriate directories and register as applications." + chmod +x "${REPO_DIR}/scripts/setup-desktop.sh" + "${REPO_DIR}/scripts/setup-desktop.sh" else - echo " Warning: desktop.sh not found. Skipping execution." + echo " Warning: ${REPO_DIR}/scripts/setup-desktop.sh not found. Skipping execution." fi -echo " Success! setup-desktop.sh" +echo " Success! install-desktop.sh" diff --git a/desktop.sh b/scripts/setup-desktop.sh similarity index 88% rename from desktop.sh rename to scripts/setup-desktop.sh index 5c40242..ea854c9 100644 --- a/desktop.sh +++ b/scripts/setup-desktop.sh @@ -2,7 +2,7 @@ # The default for XDG and xfce4 is for Desktop files to be in ~/Desktop but this leads to a variety of problems # First we are altering the user directiory which seems rude, second orphan desktop files might be in ~/Desktop so who knows # what the user Desktop experience with be, here the Desktop dir is set to /usr/share/Desktop so is part of the image. -# users that really want to customize Desktop can change ~/.config/user-dirs.dirs. Though py-rocket-base might not respect that. +# users that want to customize Desktop can change /etc/xdg/user-dirs.dirs though py-rocket resets that each time the server is restarted. set -e # Copy in the Desktop files @@ -13,7 +13,8 @@ mkdir -p "${DESKTOP_DIR}" chown :staff /usr/share/Desktop chmod 775 /usr/share/Desktop # set the Desktop dir default for XDG -echo "XDG_DESKTOP_DIR=\"${DESKTOP_DIR}\"" > /etc/xdg/user-dirs.defaults +# this is likely not used. It would be used in xdg-user-dirs-update, but that is not run. Doesn't seem to set up /etc/xdg/user-dirs.dirs correctly +echo "DESKTOP=\"${DESKTOP_DIR}\"" > /etc/xdg/user-dirs.defaults # The for loops will fail if they return null (no files). Set shell option nullglob shopt -s nullglob