Skip to content

Commit 3a0d8fe

Browse files
adding docker file and to docker compose file
1 parent a06b464 commit 3a0d8fe

2 files changed

Lines changed: 63 additions & 1 deletion

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM r-base:4.4.1
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Update package list and install required packages
6+
RUN apt-get update && \
7+
apt-get install -y build-essential wget curl libcurl4-openssl-dev libxml2-dev \
8+
zlib1g-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev
9+
10+
# Download and compile Python 3.10 with shared library support
11+
RUN wget https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tgz && \
12+
tar -xf Python-3.10.12.tgz && \
13+
cd Python-3.10.12 && \
14+
./configure --enable-optimizations --enable-shared && \
15+
make -j$(nproc) && \
16+
make altinstall && \
17+
cd .. && \
18+
rm -rf Python-3.10.12.tgz Python-3.10.12
19+
20+
# Set Python 3.10 as default
21+
RUN ln -s /usr/local/bin/python3.10 /usr/bin/python3 && \
22+
ln -s /usr/local/bin/pip3.10 /usr/bin/pip3
23+
24+
# Update library paths for Python shared library
25+
RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/python3.10.conf && ldconfig
26+
27+
# Create a Python virtual environment
28+
#RUN python3 -m venv /opt/venv
29+
#RUN /opt/venv/bin/pip install --upgrade pip
30+
31+
# Set environment variables for reticulate
32+
#ENV RETICULATE_PYTHON="/opt/venv/bin/python3"
33+
ENV PYTHONPATH=/app#"${PYTHONPATH}:/app"
34+
WORKDIR /app
35+
36+
# Set MPLCONFIGDIR to a writable directory and create it.
37+
ENV MPLCONFIGDIR=/app/tmp/matplotlib
38+
RUN mkdir -p /app/tmp/matplotlib
39+
40+
41+
# installing python libraries
42+
ADD build/novartispdx/requirements.txt .
43+
#RUN /opt/venv/bin/pip3 install -r requirements.txt
44+
RUN pip3 install -r requirements.txt
45+
46+
RUN python3 --version
47+
48+
#ENV PATH="/opt/venv/bin:$PATH"
49+
50+
ADD build/novartispdx/*py ./
51+
ADD build/novartispdx/*sh ./
52+
53+
ADD build/utils/* ./

build/docker/docker-compose.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,13 @@ services:
112112
args:
113113
HTTPS_PROXY: ${HTTPS_PROXY}
114114
platform: linux/amd64
115-
image: crcpdo:latest
115+
image: crcpdo:latest
116+
117+
novartispdx:
118+
build:
119+
context: ../../
120+
dockerfile: build/docker/Dockerfile.novartispdx
121+
args:
122+
HTTPS_PROXY: ${HTTPS_PROXY}
123+
platform: linux/amd64
124+
image: novartispdx:latest

0 commit comments

Comments
 (0)