-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-app
49 lines (39 loc) · 1.35 KB
/
Dockerfile-app
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
FROM python:3.10-slim
COPY . /app
WORKDIR /app
RUN set -ex
RUN apt-get update \
&& apt-get install -y \
bedtools \
git \
python3-dev \
python3-pip \
unzip \
wget \
&& apt-get clean
# Remove server-related configuration files
RUN rm uwsgi.ini nginx.conf
# Install dependencies
RUN pip3 install --no-cache-dir -r dependencies/requirements-app.txt
# Install mcdp2
RUN cd ../ \
&& git clone https://github.com/fmfi-compbio/mcdp2 \
&& cd mcdp2 \
&& git reset --hard fd7c69f5e97db8c1052df859cb02d86533287e64 \
&& pip3 install . \
&& cd ../app
# Write configuration file
RUN python3 config/generate_config.py --latest-version
# Download Bootstrap and Font Awesome to retain front-end styling even when offline
RUN wget https://github.com/twbs/icons/releases/download/v1.11.0/bootstrap-icons-1.11.0.zip \
&& wget https://use.fontawesome.com/releases/v6.5.2/fontawesome-free-6.5.2-web.zip \
&& unzip bootstrap-icons-1.11.0.zip \
&& unzip fontawesome-free-6.5.2-web.zip \
&& mv bootstrap-icons-1.11.0 assets \
&& mkdir -p assets/fontawesome-free-6.5.2-web \
&& mv -t assets/fontawesome-free-6.5.2-web fontawesome-free-6.5.2-web/svgs fontawesome-free-6.5.2-web/webfonts \
&& rm -rf bootstrap-* fontawesome-*
# Remove folders related to cron jobs and data preparation
RUN rm -rf cron_jobs prepare_data
EXPOSE 8050
CMD ["python3", "app.py"]