Skip to content

Commit

Permalink
Install tensorQTL 1.0.8. Needed to independently install appropriate …
Browse files Browse the repository at this point in the history
…R and python versions (and their dependencies), as conda_R/4.3 is a bit different at SLURM. This approach also doesn't rely on user-specific R packages ('qvalue')
  • Loading branch information
Nick-Eagles committed Sep 26, 2023
1 parent d742d1a commit ef2ec0e
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions tensorqtl/1.0.8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,37 @@ rm v1.0.8.tar.gz
source /jhpce/shared/jhpce/core/conda/miniconda3-23.3.1/etc/profile.d/conda.sh
conda create -y -p $PWD/tensorqtl_env -c conda-forge mamba
conda activate $PWD/tensorqtl_env
mamba install -y -c anaconda python==3.8.5
mamba install -y -c conda-forge r-base==4.2.0

# Install their recommended python dependencies, a version of PyTorch
# compatible with our CUDA/ GPU hardware, and the tensorQTL package itself
# 'rpy2' seems to need a very recent version of python, but recent versions of
# python don't have versions of torch + CUDA compatible with our GPUs. So we
# have to be careful about the versions of python, rpy2, and torch here
mamba install -y -c anaconda python==3.9
pip install rpy2==3.5.12
pip install torch==1.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html

# Otherwise, install dependencies as recommended in the repo, and add some more
# packages we frequently use
pip install -r tensorqtl-1.0.8/install/requirements.txt
pip install session-info pyhere plotnine

# Now install tensorqtl itself
pip install tensorqtl==1.0.8

# 'rpy2' needs R and the 'qvalue' package
mamba install -y -c conda-forge r-base==4.2.0
mamba install -y -c bioconda bioconductor-qvalue

conda deactivate

## Ignore all downloaded/installed files
echo "tensorqtl*" > .gitignore

# Allow fairly relaxed permissions, but protect against accidental changes to
# the conda environment
chmod -R 775 .
chmod 775 .
chmod 775 -R tensorqtl-1.0.8
chmod 775 README.md
chmod 775 .gitignore
chmod -R 555 tensorqtl_env

## Version control files
Expand All @@ -56,18 +69,14 @@ echo "Node name: ${SLURMD_NODENAME}"
$ module list

Currently Loaded Modules:
1) matlab/R2019a 4) sge/8.1.9 7) JHPCE_CENTOS7_DEFAULT_ENV
2) stata/17 5) gcc/4.4.7 8) conda/3-4.11.0
3) JHPCE_tools/1.0 6) COMMUNITY_CENTOS7_DEFAULT_ENV 9) conda_R/4.3

1) JHPCE_tools/3.0



$ date
Fri Jun 16 11:44:40 EDT 2023

Tue Sep 26 03:40:36 PM EDT 2023
$ echo "User: ${USER}"
User: neagles

$ echo "Hostname: ${HOSTNAME}"
Hostname: compute-126.cm.cluster
$ echo "Node name: ${SLURMD_NODENAME}"
Node name: compute-070
```

0 comments on commit ef2ec0e

Please sign in to comment.