-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·66 lines (53 loc) · 1.69 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
FROM python:3.7-alpine
ENV PYTHONUNBUFFERED 1
RUN mkdir -p /usr/src/app
# Adding mandatory packages to docker
RUN apk update && apk add --no-cache \
postgresql postgresql-client\
zlib \
jpeg \
openblas \
libstdc++
# Installing temporary packages required for installing requirements.pip
RUN apk add --no-cache --virtual build-deps \
py3-pip py3-pip py3-pip py3-brotli \
gcc musl-dev python3-dev pango\
postgresql-dev\
zlib-dev \
jpeg-dev \
g++ \
openblas-dev \
cmake \
openssl-dev cargo libjpeg \
libffi-dev libc-dev gettext \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h
# Update pip
RUN pip install --upgrade pip
# Installing scipy
#RUN pip3 install --no-cache-dir --disable-pip-version-check scipy==1.3.1
# Installing numpy, scipy, psycopg2, gensim
RUN pip3 install --no-cache-dir \
numpy \
pandas \
psycopg2 \
autopep8 pylint pylint-django
# scipy
# gensim==3.8.1 # remove it if not necessary
# Installing requirements.pip from project
COPY ./requirements.txt /requirements.txt
RUN pip install --no-cache-dir -r /requirements.txt
#RUN pip install django-pandas
#RUN pip install py3dns==3.2.1
# update apk repo
RUN echo "http://dl-4.alpinelinux.org/alpine/v3.14/main" >> /etc/apk/repositories && \
echo "http://dl-4.alpinelinux.org/alpine/v3.14/community" >> /etc/apk/repositories
# install chromedriver
#RUN apk update
RUN apk add chromium chromium-chromedriver
# removing temporary packages from docker and removing cache
RUN apk del build-deps && \
find -type d -name __pycache__ -prune -exec rm -rf {} \; && \
rm -rf ~/.cache/pip
COPY . /usr/src/app/
COPY fonts/. /usr/share/fonts
WORKDIR /usr/src/app