forked from NetManAIOps/CIRCA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (32 loc) · 1.17 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
# Edited from https://stackoverflow.com/a/64524896
FROM r-base:4.0.5
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev \
git \
vim \
&& rm -rf /var/lib/apt/lists/*
RUN wget -q https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz \
&& tar -xf Python-3.9.10.tgz \
&& cd Python-3.9.10 \
&& ./configure --enable-optimizations \
&& grep ssl Modules/Setup | sed 's/^#//' >> Modules/Setup.local \
&& make -j 2 \
&& make altinstall \
&& cd .. \
&& rm -r Python-3.9.10.tgz Python-3.9.10
RUN ln -s /usr/local/bin/python3.9 /usr/local/bin/python \
&& ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip3
RUN pip3 install --upgrade pip
WORKDIR /app
# installing python libraries
RUN pip3 install --no-cache-dir --prefer-binary rpy2
COPY build/requirements.txt .
RUN pip3 install --no-cache-dir --prefer-binary -r requirements.txt
# installing R libraries
COPY build/requirements.R .
RUN Rscript requirements.R