Skip to content

Commit

Permalink
Updated README for env set up; Added more packages
Browse files Browse the repository at this point in the history
  • Loading branch information
cgpu committed Feb 14, 2020
1 parent bebb4a5 commit 28eaa70
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
47 changes: 35 additions & 12 deletions dependencies/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,58 @@
# Create a `requirements.txt` from the output of `conda list -e`
# Starting in a new Jupyter Lab session in CloudOS

1. Capture conda installed packages
After your Notebook Session has initilased in CloudOS, open a terminal type the following command:

```bash
conda list > dependencies/conda_list.txt
```
git clone https://github.com/TheJacksonLaboratory/lifebitCloudOSDRE.git

2. Reformat to create a requirement.txt files
```

Follow the instructions to configure the git config, your GitHub associated email and name.

# `cd` into the `lifebitCloudOSDRE` directory

```bash

cd lifebitCloudOSDRE
git checkout cristina-jupyter

```R
library(readr)
conda_list <- read_table2("dependencies/conda_list.txt", col_names = FALSE, comment = "#")
colnames(conda_list) <- c('package', 'version', 'build', 'channel')
conda_list$requirements <- paste0(conda_list$channel, "::", conda_list$package, "=", conda_list$version)
data.table::fwrite(conda_list[,'requirements'], file = "dependencies/requirements.txt", quote = FALSE, col.names = FALSE)
```

# Initialise your environment

Open a terminal and type the following command:

```bash

conda init

```

This will prepare your environment to be able to use `conda`. After the command has been executed, close this terminal and open a fresh one.
You might be prompted to do so by `conda` as well.


# Update the `base` conda environment

```bash

cd lifebitCloudOSDRE
conda env update --name base --file dependencies/requirements.txt

conda activate base
```

# Install `TheJacksonLaboratory/yarn`

Along with some other dependencies:


```bash

Rscript dependencies/install.R

```


# Ready!

Your environment is ready now, you can start working on the Jupyter Notebook.
1 change: 1 addition & 0 deletions dependencies/install.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Sys.setenv(TAR = "/bin/tar")
BiocManager::install(c('bumphunter' , 'GenomeInfoDb', 'GenomeInfoDbData')
install.packages(c('doParallel', 'doRNG', 'foreach', 'stringi'), repo = 'https://cran.r-project.org')
devtools::install_github("TheJacksonLaboratory/yarn", ref = "annes-changes", upgrade="never")

0 comments on commit 28eaa70

Please sign in to comment.