-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-deploy
45 lines (35 loc) · 1.16 KB
/
Dockerfile-deploy
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
FROM tiangolo/uwsgi-nginx-flask:python3.10
COPY . /app
WORKDIR /app
RUN set -ex
RUN apt-get update \
&& apt-get install -y \
bedtools \
cron \
git \
python3-dev \
python3-pip \
&& apt-get clean
# Install dependencies
RUN pip3 install --no-cache-dir -r dependencies/requirements-app.txt \
&& pip3 install --no-cache-dir -r dependencies/requirements-google-api.txt
# Install mcdp2
RUN cd ../ \
&& git clone https://github.com/fmfi-compbio/mcdp2 \
&& cd mcdp2 \
&& git reset --hard fd7c69f5e97db8c1052df859cb02d86533287e64 \
&& pip3 install . \
&& cd ../app
# Run cron jobs
RUN cp cron_jobs/cron-jobs /etc/cron.d/cron-jobs \
&& chmod 0644 /etc/cron.d/cron-jobs \
&& chmod +x run-cron.sh
# Create empty placeholder file for logging-related credentials
RUN mkdir -p cron_jobs/credentials \
&& touch cron_jobs/credentials/ricepilaf-logger-key.json
# Remove Bootstrap and Font Awesome style files since they are loaded via CDN when the app is deployed
RUN rm -rf assets/0-*.css
# Remove folder related to data preparation
RUN rm -rf prepare_data
# Write configuration file
RUN python3 config/generate_config.py --deployed --latest-version --logging