Skip to content

Commit 33bc8c6

Browse files
authored
Merge branch 'uvarc:staging' into qiime2
2 parents 027dd2b + 2c08e3f commit 33bc8c6

File tree

220 files changed

+4008
-41
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+4008
-41
lines changed

content/authors/ab/index.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

content/courses/pytorch-hpc/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
date : "2025-02-26T00:00:00-05:00"
33
title : "Introduction to PyTorch for HPC"
44
summary: "An introduction to devlopment with PyTorch and HPC."
5-
authors: [ab]
5+
authors: [abd]
66
categories: ["Deep Learning","Python","HPC","Machine Learning"]
77
tags: [Deep_learning,Machine_learning,Python,HPC]
88
toc: true
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: Command Line Interface to Rivanna
3+
date: 2025-06-14-14:47:30Z
4+
type: docs
5+
weight: 50
6+
toc: true
7+
menu:
8+
hpc-best-practices:
9+
---
10+
11+
## Prerequisites
12+
13+
We assume you already know the Linux basics, such as
14+
* Listing files (`ls`)
15+
* Removing files (`rm`)
16+
* Navigating directories (`cd`)
17+
* Listing file contents (`cat` and optionally `head`, `tail`, `less`, `more`)
18+
* Ability to use one or more standard editors (`vi`, `vim`, `emacs`, `nano`)
19+
* Relative and absolute paths
20+
21+
## Rivanna
22+
23+
Rivanna is the university's primary resource for high-performance computation. It provides a platform for computationally-intensive research across disciplines.
24+
25+
{{< figure src="/notes/hpc-best-practices/img/rivanna.png" width=70% height=70% >}}
26+
27+
## Logging In
28+
29+
There are several ways to log in to UVA's HPC system.
30+
31+
Open OnDemand: [https://ood.hpc.virginia.edu/](https://ood.hpc.virginia.edu/)
32+
33+
FastX: [https://ood.hpc.virginia.edu/](https://ood.hpc.virginia.edu/) (OOD > Interactive Apps > FastX Web)
34+
35+
MobaXterm (Windows): [https://www.rc.virginia.edu/userinfo/rivanna/logintools/mobaxterm/](https://www.rc.virginia.edu/userinfo/rivanna/logintools/mobaxterm/)
36+
37+
__Terminal (Mac, Linux):__
38+
```bash
39+
ssh -Y gka6a@rivanna.hpc.virginia.edu
40+
```
41+
42+
## Transfer Files
43+
To transfer files between computers, you can use commands like `scp`, `rsync`, or `sftp` in your command line interface.
44+
45+
__scp__
46+
```bash
47+
scp l_SOURCE jus2yw@rivanna.hpc.virginia.edu:r_TARGET
48+
scp jus2yw@rivanna.hpc.virginia.edu:r_SOURCE l_TARGET
49+
```
50+
51+
__rsync__
52+
```bash
53+
rsync -av ldir/ jus2yw@rivanna.hpc.virginia.edu:rdir
54+
rsync my_file jus2yw@Rivanna.hpc.virginia.edu:/scratch/$USER
55+
```
56+
57+
__sftp__
58+
```bash
59+
sftp jus2yw@Rivanna.hpc.virginia.edu
60+
Sftp> put myfile # transfer from local to Rivanna
61+
Sftp> get myfile # transfer from Rivanna to local
62+
```
63+
64+
### Globus Data Transfer
65+
66+
{{< figure src="/notes/hpc-best-practices/img/globus.png" width=50% height=50% >}}
67+
68+
Globus is a simple, reliable, and fast way to access and move your research data between systems. Globus allows you to transfer data to and from systems such as:
69+
70+
* Laptops & personal workstations
71+
* Rivanna HPC cluster
72+
* Ivy Central Storage
73+
* Lab / departmental storage
74+
* Tape archives
75+
* Cloud storage
76+
* Off-campus resources (ACCESS, National Labs)
77+
78+
Globus can help you share research data with colleagues and co-investigators, or to move data back and forth between a lab workstation and Rivanna or your personal computer.
79+
80+
Is your data stored at a different institution? At a supercomputing facility? All you need is your institution's login credentials.
81+
82+
For more info, visit [https://www.rc.virginia.edu/userinfo/globus/](https://www.rc.virginia.edu/userinfo/globus/)
83+
84+
85+
## Creating & Editing Files
86+
87+
There are a wide variety of text editors you can use to create and edit files.
88+
89+
* `gedit`
90+
* `vi`/`vim`
91+
* To enter the insert mode, press __i__
92+
* To enter the command mode, press __Esc__
93+
* To save the file, enter `w filename`
94+
* To exit without saving, press __q__
95+
* `nano`
96+
* To start writing, immediately start typing
97+
* To stop writing, press __ctrl+X__
98+
* To save the file, type the filename and press __Enter__
99+
* vscode
100+
* enter `module load code-server/4.16.1`
101+
* enter `code-server`
102+
* Open the browser and copy the given url from terminal (http://127.0.0.1:8080/)
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: Git and GitHub
3+
date: 2025-06-14-14:16:03Z
4+
type: docs
5+
weight: 500
6+
toc: true
7+
menu:
8+
hpc-best-practices:
9+
---
10+
11+
__What is version control?__
12+
13+
Version control is the process of recording and managing changes to a file or set of files over time so that you can recall specific versions later, if needed.
14+
15+
__What do we version control?__
16+
17+
The files we're typically interested in being version controlled are *software source code* files. However, you can version control almost any type of file.
18+
19+
>"In practice, everything that has been created manually should be put in version control, including programs, original field observations, and the source files for papers."
20+
>
21+
> Best Practices for Scientific Computing, Wilson et al. 2012 (arXiv:1210.0530)
22+
23+
## Git and GitHub
24+
25+
__What is Git?__
26+
27+
Git is a distributed version control system. It was designed to be *simple*, *fast*, and *fully-distributed*, with support for large projects and nonlinear development workflows. Git was originally created in 2005 by Linus Torvalds and other Linux kernel developers when the free use of the proprietary version control system they had been using for kernel development was revoked by its copyright holder.
28+
29+
### Private vs Public Repositories
30+
31+
{{< figure src="/notes/hpc-best-practices/img/privatevspublic.png" width=70% height=70% >}}
32+
33+
When using Git, each contributor who is sharing changes with others on a project has at least two repositories:
34+
* A __private repository__ is the one that exists on your local computer and is the one you make commits to
35+
* A __public repository__ is the one that you use to share your changes with collaborators
36+
37+
## The Git Workflow
38+
39+
1. Update your private repository by `fetch`ing all recent changes committed by your team of collaborators from the shared public repository (or their individual public repositories).
40+
41+
2. Make changes and `commit` them to your private repository.
42+
43+
3. Review your committed changes.
44+
45+
4. Share your new changes with the team by pushing your committed changes back to the team's shared public repository (or your individual public repository; then submit a pull request from your public repository to the team's shared public repository).
46+
47+
5. Rinse and repeat.
48+
49+
## Getting Started with GitHub
50+
51+
{{< figure src="/notes/hpc-best-practices/img/git1.png" width=30% height=30% >}}
52+
53+
GitHub website: https://github.com
54+
55+
### Your GitHub Profile
56+
57+
{{< figure src="/notes/hpc-best-practices/img/git2.png" width=70% height=70% >}}
58+
59+
### Creating a New GitHub Repository
60+
61+
{{< figure src="/notes/hpc-best-practices/img/git3.png" width=70% height=70% >}}
62+
63+
### Your GitHub Repository After the First `git push`
64+
65+
{{< figure src="/notes/hpc-best-practices/img/git4.png" width=70% height=70% >}}
66+
67+
## Using GitHub with Rivanna
68+
69+
__I need to push and commit code changes from Rivanna/Afton to my GitHub account. How do I set that up?__
70+
71+
You must first generate an ssh key and then copy it to your Git repository. Here are the instructions for generating the ssh key and what to do on your Git page:
72+
73+
1. To generate an ssh key, see the following link: [ssh key generation](https://www.rc.virginia.edu/userinfo/howtos/general/sshkeys/)
74+
75+
2. Click on the drop-down menu next to your Git profile picture in the upper right corner; Select Settings; Click on SSH and GPG keys in the left column; Click on the New SSH Key button and follow the directions to upload your ssh key. Make sure that the ssh key is in your authorized_keys file in your .ssh directory on Rivanna/Afton.
76+
77+
3. The next step is to clone the repository using the ssh link. If you have already cloned the repository using the http link and made a number of changes to your files, you won’t want to redo them. Rename the directory that was created when you first cloned the repository. Then, re-clone the repository using the ssh link and copy all of the files you had changed to the new directory. Finally, push those changes back to the repository.
78+
79+
## Benefits of Version Control
80+
81+
* __Archiving:__ You *must* regularly save the changes you make
82+
83+
* __Reproducibility:__ Creating a history of saved changes allows you to revert selected files or your entire project back to any previous state in its recorded history.
84+
85+
* __Collaboration:__ You and a team of contributors can work on a project independently, but share your changes amongst one another as the project takes shape.
86+
87+
* __Accountability:__ Compare changes, see who last modified something, and who introduced a problem and when
88+
89+
* __Recoverability:__ Each contributor has their own local, recent copy of the project and its complete history, making it highly unlikely you'll ever lose a significant portion of the project
90+
91+
## References
92+
93+
* __Version Control with Git__ by D. Huang and I. Gonzalez: https://swcarpentry.github.io/git-novice/
94+
* __Pragmatic Version Control Using Git__ by T. Swicegood
95+
* __Pro Git__ by S. Chacon and B. Straub: https://git-scm.com/book/en/v2
96+
* Research Computing Documentation: https://learning.rc.virginia.edu/notes/git-intro/

0 commit comments

Comments
 (0)