The server you are accessing has a package management system called conda. Learn more about conda here. Conda works by creating 'environments' which contain software that is only accessible from within that environment. This means that making a change in an environment doesn't affect the rest of the server. This is also useful because you can completely control the software within your environment -- no admin privileges are required to install new programs. In this tutorial, you will initialize conda, create a personal conda environment, install a software program into it, and set up your jupyter notebook to recognize that environment automatically.
These steps must be completed in a 'terminal' session:
- Initialize conda for your user account:
conda init
- Close and reopen your terminal session. You should now see
(base)infront of the command line. - Create your personal environment (replace
<username>with your username). When prompted, selectyand hit 'enter':
conda create -n <username> ipykernel
- Activate your environment:
conda activate <username>
- Install a software program:
conda install -c bioconda salmon
- Verify that
salmonwas correctly installed (will show "Salmon" in ascii art if it worked):
salmon swim
- Link your environment with your jupyter profile:
.conda/envs/<username>/bin/python -m ipykernel install --user --name '<username>' --display-name "<username>'s environment"
- Return to the Launcher (
+symbol) or press ctrl + shift + L (windows) you should see an option to launch a jupyter notebook with<username>'s environment
NOTE: Every time your open a new terminal, you will be in the (base) environment -- however, you do not have permissions for downloading software into the (base) environment (it will produce an error if you try). Before you can download a program, you will need to run conda activate <username>. Doing this should change the (base) environment to one which displays (<username>).
The first task is to set up a github account, create a new repository, and push your first commit
- Visit github.com and create an account if you don't already have one
- Go to your repositories page and create a new one
- Open jupyter lab and create a new 'terminal' page
- Use the terminal to create a directory for your workshop project (rename this with the actual name of your project):
mkdir myproject - Navigate to the project directory:
cd myproject - Configure that directory as a git repository:
git init - Add a new file:
echo "# myproject" > README.md - Add the file (and any others in this folder) to your git repository:
git add . - Configure your repository author information:
git config user.email "yourName@livemail.uthscsa.edu"
git config user.name "Your Name"
- Add your first commit (don't forget the message
-m "my message"):git commit -m "My first commit!" - Link your local repository to your github.com repository:
git remote add origin https://github.com/yourName/github_repo_name.git - Push your local repository to github.com:
git push -u origin master - Check your github.com repository -- it should that you successfully added a new file "README.md" which says "myproject".