forked from dieterich-lab/circtools
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
118 lines (102 loc) · 3.2 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
FROM ubuntu:22.04
LABEL stage=builder
LABEL maintainer="[email protected]"
ARG MAKEFLAGS="-j4"
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Phoenix
# update all repos, install minimal start packages
RUN apt-get update && \
apt-get install --no-install-recommends wget git gpg ca-certificates -y
RUN useradd -ms /bin/bash circtools
COPY Makevars /root/.R/Makevars
# Install all base packages for R and building
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive TZ=America/Phoenix apt-get install --no-install-recommends -y \
r-base \
python3 \
python3-dev \
python3-pip \
python3-venv \
make \
bzip2 \
rsync \
g++ \
gfortran \
libpng-dev \
zlib1g-dev \
libbz2-dev \
libjpeg-turbo8-dev \
libopenblas-dev \
libcurl4-openssl-dev \
libxml2-dev \
libblas-dev \
liblzma-dev \
libgit2-dev \
libfontconfig1-dev \
liblapack-dev \
libssl-dev \
libharfbuzz-dev \
uuid-dev \
libmariadb-dev-compat \
libfribidi-dev \
libfreetype6-dev \
libtiff5-dev \
libncurses-dev \
libjpeg-dev
# make build dir
RUN mkdir /build/
# Download and install BEDTools
RUN cd /build/ && \
wget https://github.com/arq5x/bedtools2/releases/download/v2.31.1/bedtools-2.31.1.tar.gz && \
tar zxvf bedtools-2.31.1.tar.gz && \
cd bedtools2 && \
make -j4 && \
cp bin/* /usr/local/bin/ && \
cd /build/ && \
git clone --depth=1 https://github.com/icebert/pblat.git && \
cd pblat && \
make && \
cp pblat /usr/local/bin/ &&\
cd /build/ && \
wget https://github.com/samtools/samtools/releases/download/1.21/samtools-1.21.tar.bz2 && \
tar xvf samtools-1.21.tar.bz2 && \
cd samtools-1.21 && \
make && \
make install &&\
cd /build/ && \
git clone --depth=1 https://github.com/ucscGenomeBrowser/kent.git && \
cd kent/src/ && \
make userApps && \
cp ~/bin/`uname -m`/liftOver /usr/local/bin
# Download and install circtools
ADD . /build/circtools/
#RUN cd /build/ && \
# python3 -m pip install -U setuptools numpy --break-system-packages && \
# python3 -m pip install circtools/ --break-system-packages && \
# cd /build/ && \
# Rscript circtools/circtools/scripts/install_R_dependencies.R circtools/circtools/ &&\
# pip install nanofilt --break-system-packages -v &&\
# pip cache purge && \
# apt-get purge python3-dev -y && \
# apt-get autoremove -y && \
# apt-get autoclean -y && \
# rm /build/ /var/lib/apt/lists/ -rf
RUN python3 -m venv /circtools && \
cd /build/ && \
. /circtools/bin/activate && \
pip install numpy && \
pip install circtools/ --verbose && \
cd /build/ && \
Rscript circtools/circtools/scripts/install_R_dependencies.R circtools/circtools/ &&\
pip install nanofilt -v &&\
pip cache purge && \
apt-get purge python3-dev -y && \
apt-get autoremove -y && \
apt-get autoclean -y && \
rm /build/ /var/lib/apt/lists/ -rf
# add script to bend absolute path names for circtools inside docker
ADD docker_path_wrapper.py /usr/local/bin/
RUN mkdir /host_os/
LABEL org.opencontainers.image.description="Official circtools Docker image"
# define entrypoint
ENTRYPOINT ["docker_path_wrapper.py"]