Skip to content

Commit d9d2536

Browse files
NEW: Ubuntu and Nvidia based images
1 parent e573838 commit d9d2536

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

3.9/Ubuntu/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM ubuntu:20.04 AS builder-image
2+
3+
# To avoid tzdata blocking the build with frontend questions
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
RUN apt-get update && apt-get install --no-install-recommends -y python3.9 python3.9-dev python3.9-venv python3-pip python3-wheel build-essential && \
7+
apt-get clean && rm -rf /var/lib/apt/lists/*
8+
9+
# create and activate virtual environment
10+
RUN python3.9 -m venv /opt/venv
11+
ENV PATH="/opt/venv/bin:$PATH"
12+
13+
RUN pip3 install --no-cache-dir tiatoolbox
14+
15+
FROM ubuntu:20.04 AS runner-image
16+
RUN apt-get update && apt-get install --no-install-recommends -y python3.9 python3-venv \
17+
libopenjp2-7-dev libopenjp2-tools \
18+
openslide-tools \
19+
libgl1 \
20+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
21+
22+
COPY --from=builder-image /opt/venv /opt/venv
23+
24+
# activate virtual environment
25+
ENV VIRTUAL_ENV=/opt/venv
26+
ENV PATH="/opt/venv/bin:$PATH"
27+
28+
CMD ["python3"]

Nvidia/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM nvcr.io/nvidia/pytorch:21.12-py3
2+
3+
# To avoid tzdata blocking the build with frontend questions
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
RUN apt-get -y update && apt-get -y install --no-install-recommends \
7+
libopenjp2-7-dev libopenjp2-tools \
8+
openslide-tools \
9+
libgl1 \
10+
&& pip3 --no-cache-dir install tiatoolbox \
11+
&& apt-get clean \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
CMD ["python3"]

0 commit comments

Comments
 (0)