Skip to content

Commit

Permalink
Merge pull request #19 from rachelicr/ra-r-script
Browse files Browse the repository at this point in the history
Ra r script
  • Loading branch information
rachelicr authored Nov 24, 2023
2 parents 3c39439 + 236914d commit e186d28
Show file tree
Hide file tree
Showing 61 changed files with 1,489 additions and 729 deletions.
Binary file removed .DS_Store
Binary file not shown.
68 changes: 46 additions & 22 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,77 @@
### USE IMAGE
# ctrl-sh-p in vscode and select the image

### TAG IMAGE
# docker tag rachelicr/env-pisca-v1 rachelicr/env-pisca-v1:v04

### PUSH IMAGE
# docker push rachelicr/env-pisca-v1:v01
# docker push rachelicr/env-pisca-v1

#################################################################################
# Image downloaded with advice from: # https://stackoverflow.com/questions/54437030/how-can-i-create-a-docker-image-to-run-both-python-and-r
###########################################################################
###################### THEN INSTALL PYTHON ################################
###########################################################################
FROM ubuntu:latest
#FROM r-base:4.0.3
#FROM r-base:4.3.2
COPY . /app
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends build-essential r-base r-cran-randomforest python3.10 python3-pip python3-setuptools python3-dev
#RUN apt-get update && apt-get install -y --no-install-recommends build-essential libpq-dev python3.10 python3-pip python3-setuptools python3-dev
#RUN pip3 install --upgrade pip
WORKDIR /app
#RUN apt-get update && apt-get install -y --no-install-recommends build-essential r-base r-cran-randomforest python3.10 python3-pip python3-setuptools python3-dev
RUN apt-get update && apt-get install -y --no-install-recommends build-essential python3.10 python3-pip python3-setuptools python3-dev
###########################################################################
############# # installing python libraries ##############################
###########################################################################
ADD requirements.txt .
ADD requirements.r .
# installing python libraries
#RUN python3 -m venv .cont_env
#RUN source .cont_env/bin/activate
ADD requirements.R .
RUN pip3 install -r requirements.txt
# installing r libraries
RUN Rscript requirements.r
COPY . /app
#######################################################################################
# The pisca special additions needed
###########################################################################
WORKDIR /project
COPY . /project
# Install software
RUN apt-get update -y
RUN apt-get install -y openssh-client
RUN apt-get install -y wget
###########################################################################
###################### INSTALL R ################################
###########################################################################
RUN apt-get install -y gdebi-core
RUN apt-get install -y libcairo2-dev libxt-dev
RUN wget -O r-4.3.2_1_amd64.deb https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-4.3.2_1_amd64.deb
RUN gdebi -n r-4.3.2_1_amd64.deb
ENV PATH=/opt/R/4.3.2/bin:$PATH
# install required R libraries
RUN R -e "install.packages('ape',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('jsonlite',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('data.table',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('ggplot2',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('cowplot',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('HDInterval',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('lubridate',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('svglite',dependencies=TRUE, repos='http://cran.rstudio.com/')"
# And from BIOCMANAGER
RUN R -e "install.packages('BiocManager',dependencies=TRUE, repos='http://cran.rstudio.com/')"
RUN R -e "BiocManager::install('treeio')"
RUN R -e "BiocManager::install('ggtree')"
###########################################################################
###################### THEN INSTALL BEAST/PISCA ###########################
###########################################################################
RUN apt-get update -y
ENV JAVA_HOME=/project/jdk-20.0.2
ENV PATH=$JAVA_HOME/bin:$PATH
ENV PATH=/project/BEASTv1.8.4/bin:$PATH
# install the correct version of java!!!!!
#RUN wget -O jdk.tar.gz https://download.oracle.com/java/20/latest/jdk-20_linux-x64_bin.tar.gz
# it looks like that version has been moved to the archive between 10/10/23 and 17/10/23
# install the correct version of java!!!!! - makes directory jdk-20.0.2
RUN wget -O jdk.tar.gz https://download.oracle.com/java/20/archive/jdk-20.0.2_linux-x64_bin.tar.gz
RUN tar zxvf jdk.tar.gz
## makes directory jdk-20.0.2
# Install beast
# Install beast - makes directory BEASTv1.8.4
RUN wget -O beast.tgz https://github.com/beast-dev/beast-mcmc/releases/download/v1.8.4/BEASTv1.8.4.tgz
RUN tar -xvzf beast.tgz
## makes directory BEASTv1.8.4
# Install pisca
# Install pisca - ## makes directory PISCAv1.1 ## note that cd has to be inline with other commands
RUN wget -O pisca.tgz https://github.com/adamallo/PISCA/releases/download/v1.1/PISCAv1.1.tgz
RUN tar -xvzf pisca.tgz
## makes directory PISCAv1.1 ## note that cd has to be inline with other commands
RUN chmod +x /project/PISCAv1.1/install.sh
RUN cd /project/PISCAv1.1/ && ./install.sh /project/BEASTv1.8.4/
# make a dir for the tmp files
RUN mkdir /project/xml


2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// Build development container from pre-existing image
"image": "rachelicr/env-pisca-v1",
"image": "rachelicr/env-pisca-v1:latest",

// Set *default* container specific settings.json values on container create.
"settings": {},
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,6 @@ cython_debug/
*.Zone.Identifier
.ds_store
*.svg
/pisca-box-vue/temp/*
!/pisca-box-vue/temp/make.txt

Loading

0 comments on commit e186d28

Please sign in to comment.