-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from nanli-emory/ray_cluster_functionality
Update Dockerfile for ray-ml
- Loading branch information
Showing
5 changed files
with
21 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,23 @@ | ||
# Dockerfile for HistoQC. | ||
# | ||
# This Dockerfile uses two stages. In the first, the project's python dependencies are | ||
# installed. This requires a C compiler. In the second stage, the HistoQC directory and | ||
# the python environment are copied over. We do not require a C compiler in the second | ||
# stage, and so we can use a slimmer base image. | ||
|
||
FROM python:3.8 AS builder | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
WORKDIR /opt/HistoQC | ||
COPY . . | ||
# Create virtual environment for this project. This makes it easier to copy the Python | ||
# installation into the second stage of the build. | ||
ENV PATH="/opt/HistoQC/venv/bin:$PATH" | ||
RUN python -m venv venv \ | ||
&& python -m pip install --no-cache-dir setuptools wheel \ | ||
&& python -m pip install --no-cache-dir -r requirements.txt \ | ||
&& python -m pip install --no-cache-dir . \ | ||
# We force this so there is no error even if the dll does not exist. | ||
&& rm -f libopenslide-0.dll | ||
|
||
FROM python:3.8-slim | ||
FROM rayproject/ray-ml:latest-gpu | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
USER root | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libopenslide0 \ | ||
libtk8.6 \ | ||
procps \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /opt/HistoQC | ||
COPY --from=builder /opt/HistoQC/ . | ||
ENV PATH="/opt/HistoQC/venv/bin:$PATH" | ||
COPY . . | ||
# install | ||
RUN pip install --no-cache-dir setuptools wheel \ | ||
&& pip install --no-cache-dir -r requirements.txt \ | ||
&& pip install --no-cache-dir . \ | ||
&& rm -f libopenslide-0.dll | ||
|
||
WORKDIR /data | ||
|
||
CMD ["bash"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .openslide import openslide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters