Friday, January 27, 2023

A Singularity definition file with R installation

Bootstrap:docker
From:ubuntu:latest
%post
    apt update
    apt -y install openssh-server
    apt -y install openssh-client
    apt -y install build-essential
    apt -y install less
    apt -y install nano
    TZ="America/New_York"
    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
    apt -y install tzdata
    apt -y install locales
    locale-gen --purge en_US.UTF-8
    # install R
    apt -y install --no-install-recommends software-properties-common dirmngr
    wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
    add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
    apt -y install --no-install-recommends r-base
%environment
    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8






Friday, January 13, 2023

wsl logon failure: the user has not been granted the requested logon type at this computer.

To resolve this error, run the following command to restart the virtual machine service:

powershell restart-service vmcompute

 

Reference: https://github.com/microsoft/WSL/issues/5401