11FROM r-base:4.4.1
2+
23ENV DEBIAN_FRONTEND=noninteractive
3- RUN apt-get update --fix-missing
4-
5- # 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
6-
7- RUN apt-get install -y --fix-missing --allow-unauthenticated \
8- build-essential \
9- python3-pip \
10- python3-setuptools \
11- python3-dev \
12- python3-venv \
13- libcurl4-openssl-dev \
14- libglpk-dev \
15- libxml2-dev \
16- libpq-dev \
17- ca-certificates
18-
19- RUN python3 -m venv /opt/venv
20- RUN /opt/venv/bin/pip3 install --upgrade pip
21-
22- # Set MPLCONFIGDIR to a writable directory
4+
5+ # Update and upgrade packages, then install required packages.
6+ RUN apt-get update --fix-missing && \
7+ apt-get upgrade -y && \
8+ 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+ apt-get clean && rm -rf /var/lib/apt/lists/*
20+
21+ # Create and upgrade the Python virtual environment.
22+ RUN python3 -m venv /opt/venv && \
23+ /opt/venv/bin/pip install --upgrade pip
24+
25+ # Set MPLCONFIGDIR to a writable directory and create it.
2326ENV MPLCONFIGDIR=/app/tmp/matplotlib
2427RUN mkdir -p /app/tmp/matplotlib
2528
26-
29+ # Set Python path and working directory.
2730ENV PYTHONPATH "${PYTHONPATH}:/app"
2831WORKDIR /app
2932
33+ # Add application files.
3034ADD build/broad_sanger/01-broadSangerSamples.R ./
3135ADD build/broad_sanger/02-broadSangerOmics.R ./
3236ADD build/broad_sanger/02a-broad_sanger_proteomics.py ./
@@ -40,14 +44,8 @@ ADD build/broad_sanger/05b_separate_datasets.py ./
4044ADD build/broad_sanger/requirements.txt .
4145ADD build/broad_sanger/omics_requirements.r .
4246
43- # installing r libraries
47+ # Install R libraries.
4448RUN Rscript omics_requirements.r
4549
46- # installing python libraries
47- RUN /opt/venv/bin/pip3 install -r requirements.txt
48-
49-
50-
51-
52-
53-
50+ # Install Python libraries.
51+ RUN /opt/venv/bin/pip install -r requirements.txt
0 commit comments