-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
147 lines (126 loc) · 5.27 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
FROM ubuntu:22.04
ENV WORKSPACE=/tools
RUN mkdir $WORKSPACE
RUN mkdir $WORKSPACE/dendR
RUN mkdir $WORKSPACE/scripts
RUN mkdir $WORKSPACE/resources
RUN mkdir $WORKSPACE/resources/assets
RUN mkdir $WORKSPACE/resources/github_actions
ENV DEBIAN_FRONTEND=noninteractive
# for cellxgene-census
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
git \
openjdk-11-jdk-headless \
python3-pip \
python3-dev \
python3-virtualenv \
make \
curl \
wget \
libcurl4-openssl-dev \
openssl \
# r-base \
# leiningen \
# gpg \
pkg-config \
zip \
unzip \
tar \
ninja-build \
supervisor
# setup supervisord
RUN mkdir -p /var/log/supervisor
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# to speedup R package installations (try apt-cache search r-cran-remotes) https://datawookie.dev/blog/2019/01/docker-images-for-r-r-base-versus-r-apt/
#RUN apt-get update && \
# apt-get install -y -qq \
# r-cran-remotes \
# r-cran-jsonlite \
# r-cran-data.table \
# r-cran-ggplot2 \
# r-cran-dendextend \
# r-cran-biocmanager \
# r-cran-knitr \
# r-cran-httr
# install pandoc (required by AllenInstitute/CCN)
#RUN wget https://github.com/jgm/pandoc/releases/download/2.19.2/pandoc-2.19.2-1-amd64.deb
#RUN dpkg -i ./pandoc-2.19.2-1-amd64.deb
ADD Makefile $WORKSPACE
ADD resources/repo_README.md $WORKSPACE/resources
ADD resources/repo_PURL_config.yml $WORKSPACE/resources
ADD resources/repo_mkdocs.yml $WORKSPACE/resources
ADD resources/repo_mkdocs_large.yml $WORKSPACE/resources
ADD requirements.txt $WORKSPACE
ADD tdt/tdt.py $WORKSPACE
ADD tdt/api/tdt_api.py $WORKSPACE
ADD tdt/api/review.py $WORKSPACE
ADD tdt/api/user_info.py $WORKSPACE
ADD tdt/api/tdt_info.py $WORKSPACE
ADD tdt/tdt_info.yaml $WORKSPACE
ADD tdt/api/flags.py $WORKSPACE
ADD dendR/nomenclature_builder.R $WORKSPACE/dendR
ADD dendR/install_packages.R $WORKSPACE/dendR
ADD dendR/required_scripts.R $WORKSPACE/dendR
ADD scripts/run.sh $WORKSPACE/scripts
ADD scripts/run.bat $WORKSPACE/scripts
ADD scripts/import.py $WORKSPACE/scripts
ADD scripts/configurations.py $WORKSPACE/scripts
ADD scripts/export.py $WORKSPACE/scripts
ADD scripts/upgrade.py $WORKSPACE/scripts
ADD scripts/.gitignore $WORKSPACE/scripts
ADD resources/assets/logo.webp $WORKSPACE/resources/assets
ADD resources/github_actions/publish-docs.yml $WORKSPACE/resources/github_actions
RUN python3 -m pip install -r $WORKSPACE/requirements.txt
# install cas-tools and its dependencies seperately to avoid cellxgene-census installation issues
RUN python3 -m pip install anndata==0.10.3
RUN python3 -m pip install ruamel.yaml==0.18.6
RUN python3 -m pip install jsonschema==4.4.0
RUN python3 -m pip install ordered-set==4.1.0
RUN python3 -m pip install deepmerge==1.1.0
RUN python3 -m pip install numpy==1.26.4
RUN python3 -m pip install marshmallow==3.21.1
RUN python3 -m pip install python-dateutil==2.9.0
RUN python3 -m pip install cap-anndata==0.2.1
RUN python3 -m pip install --no-deps cas-tools==1.0.11
RUN python3 -m pip install --no-deps tdta==0.1.0.dev25
#RUN Rscript $WORKSPACE/dendR/install_packages.R
#RUN python3 -m pip install --no-deps --index-url https://test.pypi.org/pypi/ --extra-index-url https://pypi.org/simple cas-tools==0.0.1.dev44
WORKDIR $WORKSPACE
### NANOBOT reources
RUN mkdir $WORKSPACE/nanobot
ADD nanobot/nanobot.toml $WORKSPACE/nanobot
RUN mkdir $WORKSPACE/nanobot/src
RUN mkdir $WORKSPACE/nanobot/src/schema
ADD nanobot/src/schema/column.tsv $WORKSPACE/nanobot/src/schema
ADD nanobot/src/schema/datatype.tsv $WORKSPACE/nanobot/src/schema
ADD nanobot/src/schema/table.tsv $WORKSPACE/nanobot/src/schema
RUN mkdir $WORKSPACE/nanobot/src/assets
ADD nanobot/src/assets/bstreeview.css $WORKSPACE/nanobot/src/assets
ADD nanobot/src/assets/bstreeview.js $WORKSPACE/nanobot/src/assets
ADD nanobot/src/assets/ols-autocomplete.css $WORKSPACE/nanobot/src/assets
ADD nanobot/src/assets/ols-autocomplete.js $WORKSPACE/nanobot/src/assets
ADD nanobot/src/assets/styles.css $WORKSPACE/nanobot/src/assets
RUN mkdir $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/cross_taxonomy.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/ols_form.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/taxonomy_view.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/table.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/page.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/review.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/edit_annotation_transfer.html $WORKSPACE/nanobot/src/resources
# GH cli on linux is old (2.4.0), get the latest
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
RUN chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
RUN apt-get update && \
apt-get install -y aha \
sqlite3 \
python3-psycopg2
RUN apt-get install gh --allow-unauthenticated
# restore WORKDIR
WORKDIR /tools
RUN chmod 777 $WORKSPACE/*.py
CMD python3 $WORKSPACE/tdt.py