The Nextjournal Bash Environment
The default environment for Bash, and the basis of many other Nextjournal environments.
The Minimal Bash environment is the default for a Bash cell, and also serves as the base for most language images. Below is a list of installed packages.
apt list --installed
We set the timezone and install some basic packages including
git. We've also set a number of environment variables in the runtime's settings—in particular, the value of
NEXTJOURNAL_MOUNT_CUDA sets the default Nvidia CUDA and cuDNN versions for all descendant environments.
echo "UTC" > /etc/timezone echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-yes apt-get -qq update DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends apt-utils net-tools \ ca-certificates locales tzdata sudo \ curl wget zip unzip gzip bzip2 xz-utils unrar p7zip-full \ gnupg git patch apt-get clean rm -r /var/lib/apt/lists/* # Clear package list so it isn't stale
Generate the locale that we set in the environment variables.
locale-gen en_US.UTF-8 update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.en LC_ALL=en_US.UTF-8
And ensure the GPU libraries can be used.
echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/cuda.conf echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf ldconfig