File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 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" ]
Original file line number Diff line number Diff line change 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" ]
You can’t perform that action at this time.
0 commit comments