-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
63 lines (57 loc) · 1.7 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
# Build arguments
ARG PYTHON_VERSION=3.10-slim
# Python version: 3.10
FROM python:${PYTHON_VERSION}
# Configure environment
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Setting environment with prefect version
ARG PREFECT_VERSION=0.15.9
ENV PREFECT_VERSION $PREFECT_VERSION
# Install gcc, Google Chrome, CLI tools, git, R and others libs Firefox
RUN apt-get update && \
apt-get install --no-install-recommends -y wget gnupg && \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install --no-install-recommends -y \
build-essential \
curl \
freetds-dev \
ftp \
gcc \
google-chrome-stable \
libcrypto++-dev \
libssl-dev \
p7zip-full \
python3-dev \
traceroute \
wget \
tesseract-ocr \
python3-opencv \
git \
bzip2 \
libxtst6 \
libgtk-3-0 \
libx11-xcb-dev \
libdbus-glib-1-2 \
libxt6 \
libpci-dev \
&& \
apt-get install -y r-base && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Setup virtual environment and prefect
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN python3 -m pip install --no-cache-dir -U "pip>=21.2.4" "prefect==$PREFECT_VERSION"
# Install requirements
WORKDIR /app
COPY . .
RUN python3 -m pip install --prefer-binary --no-cache-dir -U . && \
mkdir -p /opt/prefect/app/bases && \
mkdir -p /root/.basedosdados/templates && \
mkdir -p /root/.basedosdados/credentials/