Skip to content

Commit 92b89b9

Browse files
committed
Update Dockerfile to use Python 3.10 and newer Debian version.
Update Dockerfile to use Python 3.10 and newer Debian version and don't include optional dependencies in pySCENIC Docker image by default (scanpy, MulticoreTSNE, papermill, ipykernel) as they are not needed to pySCENIC in cli mode.
1 parent 6e17599 commit 92b89b9

5 files changed

+34
-150
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*/*/__pycache__
2+
.github
3+
.idea
4+
.pytest_cache
5+
.tox

Dockerfile

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
FROM python:3.7.9-slim AS compile-image
1+
FROM python:3.10.6-slim-bullseye AS compile-image
22

33
ENV DEBIAN_FRONTEND=noninteractive
4-
RUN BUILDPKGS="build-essential \
5-
python3-dev libhdf5-dev libfreetype6-dev libtool \
6-
m4 autoconf automake patch bison flex libpng-dev libopenblas-dev git \
7-
tcl-dev tk-dev libxml2-dev zlib1g-dev libffi-dev cmake" && \
8-
apt-get update && \
9-
apt-get install -y --no-install-recommends apt-utils debconf locales && dpkg-reconfigure locales && \
10-
apt-get install -y --no-install-recommends $BUILDPKGS
114

5+
# Install some dependencies:
6+
# - MulticoreTSNE: build-essential cmake
7+
# - git: to set the pySCENIC version
8+
RUN apt-get update && \
9+
apt-get install -y --no-install-recommends build-essential cmake git
10+
11+
# Create virtual environment.
1212
RUN python -m venv /opt/venv
13-
# Make sure we use the virtualenv:
13+
14+
# Make sure we use the virtual environment.
1415
ENV PATH="/opt/venv/bin:$PATH"
1516

16-
# install dependencies:
17+
# Install pySCENIC dependencies with pip.
1718
COPY requirements_docker.txt /tmp/
18-
RUN pip install --no-cache-dir --upgrade pip wheel && \
19-
pip install --no-cache-dir -r /tmp/requirements_docker.txt
19+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
2020

21-
# use version from argument (--build-arg version=0.11.0), or a default:
22-
RUN pip install --no-cache-dir scanpy==1.7.2
21+
# Install scanpy, MulticoreTSNE and ipykernel.
22+
#COPY requirements_docker_with_scanpy.txt /tmp/
23+
#RUN pip install --no-cache-dir -r /tmp/requirements_docker_with_scanpy.txt
2324

24-
# install pySCENIC from local copy:
25-
COPY pySCENIC /tmp/pySCENIC
25+
# Install pySCENIC from local copy:
26+
COPY . /tmp/pySCENIC
2627
RUN cd /tmp/pySCENIC && \
2728
pip install . && \
2829
cd .. && rm -rf pySCENIC
2930

30-
FROM python:3.7.9-slim AS build-image
31+
FROM python:3.10.6-slim-bullseye AS build-image
3132

3233
RUN apt-get -y update && \
3334
apt-get -y --no-install-recommends install \

requirements.doc.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
sphinx
2-
sphinx_rtd_theme
3-
restructuredtext_lint
2+
sphinx-rtd-theme
3+
restructuredtext-lint

requirements_docker.txt

-131
This file was deleted.

requirements_docker_with_scanpy.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# scanpy
2+
scanpy[leiden]==1.9.1
3+
louvain==0.7.1
4+
# Fastq TSNE implementation.
5+
MulticoreTSNE==0.1
6+
# Parameterizing, executing, and analyzing Jupyter Notebooks.
7+
papermill==2.3.4
8+
# IPython kernel.
9+
ipykernel==6.15.1

0 commit comments

Comments
 (0)