Skip to content

Commit

Permalink
added content
Browse files Browse the repository at this point in the history
added quick git tutorial, quick SLURM tutorial (from google slides), server usage guidelines, updates singularity instructions, and server directory map
  • Loading branch information
Christian Ramirez committed Jan 8, 2025
1 parent 4f4718c commit 998ad84
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 54 deletions.
52 changes: 43 additions & 9 deletions getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ vim ~/.config/ghostty/config
There are *_many_* settings you can adjust in this config file, all of which you read up on in the [documentation](https://ghostty.org/docs/docs).
Here's my config
```{code}
```{code} python
:filename: ~/.config/ghostty/config
:linenos:
theme = Monokai Remastered
Expand All @@ -49,7 +49,7 @@ window-padding-balance = true
```
#### SSH config env variable
For ssh to work on ghostty, you need to add this to every host in your `~/.ssh/config` file which will be discussed [later](ssh_config_file)
For ssh to work on ghostty, you need to add this to every host in your `~/.ssh/config` file which will be discussed [later](#ssh_config_file)
```
SetEnv TERM=xterm-256color
```
Expand Down Expand Up @@ -121,6 +121,35 @@ mkdir -p ~/.ssh/sockets
```bash
ssh [email protected]
```
````{dropdown} Diectory Structure
```mermaid
graph TD
root["/"] --> boot["/boot"]
root --> efi["/boot/efi"]
root --> home["/home"]
root --> tank["/tank"]
root --> zata["/zata"]
tank --> tank_home["/tank/home"]
tank_home --> dedicated["Dedicated User Mounts"]
home --> shared_users["Regular Directory Users"]
home --> mounted_users["ZFS Dataset Users"]
zata --> data["Ceph: data (4.1P)"]
zata --> zippy["Ceph: zippy (259T)"]
zata --> public["Ceph: public_html (450T)"]
root --> tmp["/tmp"]
root --> run["/run tmpfs"]
root --> dev_shm["/dev/shm tmpfs"]
classDef network fill:#f9f,stroke:#333,stroke-width:2px
classDef local fill:#bbf,stroke:#333,stroke-width:2px
class data,zippy,public network
class tmp,run,dev_shm,boot,efi local
```
````

If it's your first time, you will be prompted to scan the QR code with any two-factor authentication app. You should also be prompted to change your password.
```{important}
Expand All @@ -135,6 +164,11 @@ From bastion, you can then `ssh` into any of the ZLab servers:
ssh HOSTNAME
```
## Server Usage Guidelines
```{important}
Please read the [server usage guidelines](https://docs.google.com/document/d/1X3gSpfv0avT3M3pN5HDbY3Etal_is9be-B6wJ4DJ7Fw/edit?usp=sharing) before using any of the servers.
```
# SSH
## Fixing double login issue
Expand Down Expand Up @@ -242,11 +276,11 @@ The remote docker image `clarity001/bioinformatics` contains a full suite of bio
Create the destination folder and build the singularity sandbox container:
```bash
mkdir -p /zata/zippy/$(whoami)/bin/
singularity build --sandbox /zata/zippy/$(whoami)/bin/bioinformatics docker://clarity001/bioinformatics:latest
singularity build /zata/zippy/$(whoami)/bin/bioinformatics.sif docker://clarity001/bioinformatics:latest
```
To start an interactive shell in the *writable* container (optional):
To start an interactive shell in the container (optional):
```bash
singularity shell --writable -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics
singularity shell -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics.sif
```
(rootless_docker_setup)=
Expand All @@ -269,7 +303,7 @@ dockerd-rootless-setuptool.sh install
## Start a JupyterLab server using singularity
Using the sandbox container you just built, start the JupyterLab server with the following command:
```bash
singularity exec --writable -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics jupyter lab --port=8888 --ip=HOSTNAME --no-browser --notebook-dir=/data/GROUP/$(whoami)
singularity exec -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics.sif jupyter lab --port=8888 --ip=HOSTNAME --no-browser --notebook-dir=/data/GROUP/$(whoami)
```
## Start a JupyterLab server in a conda environment
Expand All @@ -290,7 +324,7 @@ If you are curious, this is what the previous command is doing:
ssh # The secure shell program that creates encrypted connections
-N # Flag that means "don't execute a remote command/shell" - just forward ports
-L # Flag for "local port forwarding"
8888: # The local port on your computer
8888: # The local port on your compute
HOSTNAME: # The destination server's address (check your ssh config for available hosts)
8888 # The remote port on the destination server
USERNAME@HOSTNAME # Username and server address to login to
Expand Down Expand Up @@ -330,11 +364,11 @@ Now start jupyter lab using your preferred method. [See Getting Started](getting
Defining our config options in `jupyter_server_config.py` allows you be less declarative when starting jupyter in the terminal. For example, when using singularity we can start jupyter lab with:
```bash
singularity exec --writable -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics jupyter lab
singularity exec -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics.sif jupyter lab
```
As opposed to:
```bash
singularity exec --writable -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics jupyter lab --port=8888 --ip=HOSTNAME --no-browser --notebook-dir=/data/GROUP/$(whoami)
singularity exec -B /data,/zata /zata/zippy/$(whoami)/bin/bioinformatics.sif jupyter lab --port=8888 --ip=HOSTNAME --no-browser --notebook-dir=/data/GROUP/$(whoami)
```
````
Expand Down
45 changes: 0 additions & 45 deletions learning_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,6 @@ Once you have a handle on the basics, I strongly advise moving on to learning sp
First start with learning the basics of Linux [here](https://linuxjourney.com/). I suggest only completing the "Grasshopper" courses, as these cover most of what you need to know. After you've gotten a good grasp of the basics, then move on to learning bash scripting [here](https://exercism.org/tracks/bash). While bash scripting is useful, know when to grab for fully-featured programming language as you requirements become more complex.
> [Bash Cheatsheet](https://devhints.io/bash)
## CLI Text Editor
Sometime you may need to quickly edit a config file or make changes to you .bashrc file. In these cases, the quickest way is almost always to use a CLI text editor.

### `vim`
`vim` has more functionality and configurability. However, it notoriously has a steep learning curve. Here is [a good tutorial](https://github.com/iggredible/Learn-Vim/blob/master/ch00_read_this_first.md) if you are interested.

### A Quick `vim` Tutorial

#### Basic Navigation
- `h/j/k/l` - Move cursor left/down/up/right
- `w/b` - Jump forward/backward by word
- `0/$` - Move to start/end of line
- `gg/G` - Go to first/last line

#### Modes
- `i` - Enter insert mode before cursor
- `a` - Enter insert mode after cursor
- `ESC` or `CTRL+[` - Return to normal mode
- `v` - Enter visual mode for selection

#### Essential Commands
- `:w` - Save file
- `:q` - Quit (`:q!` to force quit without saving)
- `:wq` - Save and quit
- `u` - Undo
- `CTRL+r` - Redo
- `dd` - Delete line
- `yy` - Copy line
- `p` - Paste after cursor

#### Text Operations
- `x` - Delete character
- `dw` - Delete word
- `cw` - Change word
- `/pattern` - Search forward
- `n/N` - Next/previous search result
- `:%s/old/new/g` - Replace all occurrences

You can find a more in-depth tutorial [here](https://github.com/iggredible/Learn-Vim/blob/master/ch00_read_this_first.md) if you are interested.

## Version Control

### Git
The official Git documentation includes a tutorial [here](https://git-scm.com/docs/gittutorial).

# Data Types and File Formats

## Sequence Data Formats
Expand Down

0 comments on commit 998ad84

Please sign in to comment.