11FROM r-base:4.4.1
2- ENV DEBIAN_FRONTEND=noninteractive
3- RUN apt-get update --fix-missing
4- #RUN apt-get install -y --fix-missing --allow-unauthenticated build-essential libpq-dev python3.10 python3-pip python3-setuptools python3-dev python3-venv libcurl4-openssl-dev libxml2-dev libglpk-dev
5-
6- # RUN apt-get install -y --fix-missing --allow-unauthenticated build-essential python3-pip python3-setuptools python3-dev python3-venv libcurl4-openssl-dev libglpk-dev libxml2-dev libpq-dev
72
8- RUN apt-get install -y --fix-missing --allow-unauthenticated \
9- build-essential \
10- python3-pip \
11- python3-setuptools \
12- python3-dev \
13- python3-venv \
14- libcurl4-openssl-dev \
15- libglpk-dev \
16- libxml2-dev \
17- libpq-dev \
18- ca-certificates
19-
20- RUN python3 -m venv /opt/venv
21- RUN /opt/venv/bin/pip3 install --upgrade pip
3+ ENV DEBIAN_FRONTEND=noninteractive
224
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
2335
24- # Set MPLCONFIGDIR to a writable directory
36+ # Set MPLCONFIGDIR to a writable directory and create it.
2537ENV MPLCONFIGDIR=/app/tmp/matplotlib
2638RUN mkdir -p /app/tmp/matplotlib
2739
2840
29- ENV PYTHONPATH "${PYTHONPATH}:/app"
30- WORKDIR /app
41+ ADD build/bladderpdo/requirements.R .
42+ # installing r libraries
43+ RUN Rscript requirements.R
3144
32- ADD build/broad_sanger/obtainGSMidLink.R.R ./
33- ADD build/broad_sanger/CNV-segfile-annotation.R ./
34- ADD build/broad_sanger/*py ./
35- ADD build/broad_sanger/*sh ./
3645
37- ADD build/utils/* ./
3846
47+ # installing python libraries
3948ADD build/bladderpdo/requirements.txt .
40- ADD build/bladderpdo/exp_requirements.r .
49+ #RUN /opt/venv/bin/pip3 install -r requirements.txt
50+ RUN pip3 install -r requirements.txt
4151
42- # installing r libraries
43- RUN Rscript exp_requirements.r
52+ RUN python3 --version
53+ RUN which Rscript
54+
55+ #ENV PATH="/opt/venv/bin:$PATH"
56+
57+ ADD build/bladderpdo/obtainGSMidLink.R ./
58+ ADD build/bladderpdo/CNV-segfile-annotation.R ./
59+ ADD build/bladderpdo/*py ./
60+ ADD build/bladderpdo/*sh ./
61+
62+ ADD build/utils/* ./
4463
45- # installing python libraries
46- RUN /opt/venv/bin/pip3 install -r requirements.txt
0 commit comments