This repository provides a comprehensive setup for configuring development environments both on High-Performance Computing (HPC) clusters and GitHub Codespaces. It includes essential scripts and configurations that streamline your workflow, from setting up your environment to updating your dotfiles.
- HPC Users: Clone the repo and run
install-hpc.sh
to set up your environment. - Codespaces Users: Use this repository as your dotfiles repository in your Codespaces settings.
- Update Dotfiles: Use
hpc-dotfiles-update
on HPC to keep your setup current. - Explore Commands: Use the
-h
option with most scripts to see detailed help.
- Summary
- Setup on HPC
- Update Dotfiles on HPC
- Usage on GitHub Codespaces
- Detailed Script Overview
- Dotfiles Overview
- Additional Resources
This repository contains scripts and configurations to enhance your development environment on both HPC clusters and GitHub Codespaces. The scripts automate common tasks such as container management with Apptainer, job submission with Slurm, and environment setup.
To set up your environment on an HPC cluster:
-
Clone the Repository:
git clone https://github.com/YourUsername/dotfiles.git ~/dotfiles
-
Run the Installation Script:
bash ~/dotfiles/install-hpc.sh
This script will:
- Copy all necessary scripts to your
~/.local/bin
directory. - Configure your environment by sourcing scripts in
.bashrc.d
. - Optionally copy hidden configuration files if the
-c
flag is set.
- Copy all necessary scripts to your
-
Copy Hidden Files (optional): To copy hidden configuration files, re-run the installation script with the
-c
flag:bash ~/dotfiles/install-hpc.sh -c
To update your dotfiles on the HPC, run:
hpc-dotfiles-update
This will pull the latest changes from the repository and re-run the setup script.
To use this dotfiles repository in GitHub Codespaces:
-
Set the Repository as Your Dotfiles Repo:
- Go to your GitHub account settings.
- Under "Codespaces", set this repository as your dotfiles repository.
-
Customize Your Environment: The
install.sh
script will automatically run in your Codespaces environment, setting up your development environment.
apptainer-exists
: Checks if a specified Apptainer Image File (SIF) exists.apptainer-pull
: Pulls an Apptainer image from the GitHub Container Registry and saves it locally.apptainer-run
: Runs a command inside an Apptainer container.apptainer-run-rscript
: Runs an R script inside an Apptainer container.apptainer-vscode
: Installs and manages VS Code CLI for each Apptainer image.
slurm-sbatch
: Submits a job to Slurm, saving logs in a structured directory.slurm-sintx
: Submits a Slurm job with a specified number of tasks (default is 2).slurm-squeue
: Displays the Slurm queue for the current user.
hpc-dotfiles-update
: Updates the dotfiles repository on the HPC and re-runs the setup.install-jetbrains-font
: Installs the JetBrains Mono font and configures it for use in VS Code.install-vscode
: Downloads and installs VS Code CLI, creating symbolic links for easy access.
- Contains environment variables for R projects.
- Configures Git to handle line endings with
autocrlf=input
.
- Configures the Radian REPL, disabling auto-matching of parentheses.
- Configures
lintr
to disable specific linters for R code.