-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (53 loc) · 2 KB
/
Dockerfile
File metadata and controls
64 lines (53 loc) · 2 KB
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 nciccbr/ccbr_ubuntu_22.04:v4
# build time variables
ARG BUILD_DATE="000000"
ENV BUILD_DATE=${BUILD_DATE}
ARG BUILD_TAG="000000"
ENV BUILD_TAG=${BUILD_TAG}
ARG REPONAME="000000"
ENV REPONAME=${REPONAME}
ARG R_VERSION=4.3.2
ENV R_VERSION=${R_VERSION}
SHELL ["/bin/bash", "-lc"]
# Install conda and give write permissions to conda folder
RUN echo 'export PATH=/opt2/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" -O ~/miniforge3.sh && \
/bin/bash ~/miniforge3.sh -b -p /opt2/conda && \
rm ~/miniforge3.sh && chmod 777 -R /opt2/conda/
ENV PATH="/opt2/conda/bin:$PATH"
# Pin channels and update
RUN conda config --add channels conda-forge \
&& conda config --add channels bioconda \
&& conda config --set channel_priority strict
# install conda packages
RUN mamba install -y -c conda-forge \
r-base=${R_VERSION} \
r-devtools \
r-ggplot2 \
r-ggrepel r-viridis r-upsetr r-patchwork r-plotly \
r-matrix r-mgcv r-survival \
bioconductor-genomicranges \
bioconductor-summarizedexperiment \
bioconductor-delayedarray \
bioconductor-s4arrays \
bioconductor-annotationdbi \
bioconductor-annotate \
bioconductor-keggrest \
&& conda clean -afy
# install R package
COPY . /opt2/SCWorkflow
RUN R -e "devtools::install_local('/opt2/SCWorkflow', dependencies = TRUE, repos='http://cran.rstudio.com')"
# add scworkflow exec to the path
# RUN chmod -R +x /opt2/conda/lib/R/library/SCWorkflow/exec
# ENV PATH="$PATH:/opt2/conda/lib/R/library/SCWorkflow/exec"
# RUN scworkflow --help
# copy example script & json to data
COPY ./inst/extdata/example_script.sh /data2/
COPY ./inst/extdata/json_args/ /data2/json_args/
# Save Dockerfile in the docker
COPY Dockerfile /opt2/Dockerfile_${REPONAME}.${BUILD_TAG}
RUN chmod a+r /opt2/Dockerfile_${REPONAME}.${BUILD_TAG}
# cleanup
WORKDIR /data2
RUN apt-get clean && apt-get purge \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*