forked from oloBion/Retip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (45 loc) · 1.92 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM rocker/r-ver:3.6.2
ARG MIRROR=https://mirrors.nic.cz/R/
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Prague
RUN apt -y update
RUN apt -y install libpng-dev zlib1g-dev openjdk-11-jdk-headless
RUN apt -y install libpcre3-dev liblzma-dev libbz2-dev
RUN apt -y install libicu-dev
RUN apt install -y libssl-dev libxml2-dev libssh2-1-dev libcurl4-openssl-dev
RUN Rscript -e "install.packages('devtools',repos='${MIRROR}')"
RUN Rscript -e 'devtools::install_github("Paolobnn/Retiplib")'
RUN mkdir -p /build/retip
COPY DESCRIPTION NAMESPACE Retip.Rproj /build/retip/
COPY R/ /build/retip/R/
COPY data/ /build/retip/data/
COPY examples/ /build/retip/examples/
COPY man/ /build/retip/man/
COPY vignettes/ /build/retip/vignettes/
COPY .git/ /build/retip/.git/
RUN apt -y install pkg-config
WORKDIR /build/retip
RUN Rscript -e "devtools::install_local('.',repos='${MIRROR}')"
RUN rm -rf /build/retip
RUN Rscript -e "install.packages('readxl',repos='${MIRROR}')"
RUN Rscript -e 'reticulate::install_miniconda()'
RUN bash -c "source /root/.local/share/r-miniconda/bin/activate r-reticulate && conda install keras"
#RUN bash -c "source /root/.local/share/r-miniconda/bin/activate r-reticulate && Rscript -e 'library(keras); install_keras()'"
RUN Rscript -e "install.packages('readr',repos='${MIRROR}')"
# RUN Rscript -e "install.packages('feather',repos='${MIRROR}')"
RUN apt -y install libhdf5-dev
RUN Rscript -e "install.packages('hdf5r',repos='${MIRROR}')"
RUN Rscript -e "install.packages('argparser',repos='${MIRROR}')"
WORKDIR /
RUN apt -y remove $(dpkg -l | grep -- -dev | awk '{print $2}')
RUN apt -y remove openjdk-11-jdk-headless
# nice but removes too much
# RUN apt -y autoremove
RUN apt -y clean
RUN chmod go+x /root
RUN mkdir /Retip
RUN Rscript -e "install.packages('optparse',repos='${MIRROR}')"
COPY galaxy/*.R /Retip/
COPY galaxy/run.sh /
#Don't add entrypoint because with entry point it fails with galaxy
#ENTRYPOINT [ "/run.sh" ]