-
Notifications
You must be signed in to change notification settings - Fork 83
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 #245 from Dana-Farber-AIOS/docker-ci
Docker ci
- Loading branch information
Showing
6 changed files
with
166 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
||
# Unit test / coverage reports | ||
.pytest_cache/ | ||
coverage_report_html/ | ||
.coverage | ||
|
||
# Sphinx documentation | ||
docs/build/ | ||
|
||
# data | ||
data/ | ||
|
||
# files created by matplotlib testing suite | ||
result_images/ | ||
|
||
# distribution / packaging | ||
*.egg-info | ||
*.egg | ||
build/ | ||
dist/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# scratch notebook | ||
scratch.ipynb | ||
|
||
# Mac files | ||
.DS_Store | ||
|
||
# Pycharm | ||
.idea/ | ||
|
||
# dask | ||
dask-worker-space/ | ||
|
||
# git | ||
.git | ||
.gitigore |
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,31 @@ | ||
name: Publish PathML Docker image on Docker Hub | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set version number variable | ||
run: | | ||
VER=$(cat pathml/_version.py | grep -o '"[^"]\+"' | tr '"' ' ') | ||
echo "VERSION=$VER" >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/[email protected] | ||
with: | ||
push: true | ||
tags: | ||
pathml/pathml:latest | ||
pathml/pathml:${{ env.VERSION }} |
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,59 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM ubuntu:20.04 | ||
# LABEL about the custom image | ||
LABEL maintainer="[email protected]" | ||
LABEL description="This is custom Docker Image for running PathML" | ||
|
||
# Disable Prompt During Packages Installation | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
#Set miniconda path | ||
ENV PATH="/root/miniconda3/bin:${PATH}" | ||
ARG PATH="/root/miniconda3/bin:${PATH}" | ||
|
||
ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre/" | ||
ARG JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre/" | ||
|
||
ENV SHELL="/bin/bash" | ||
|
||
#install packages on root | ||
USER root | ||
|
||
#download and install miniconda and external dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends openslide-tools \ | ||
g++ \ | ||
gcc \ | ||
libpixman-1-0 \ | ||
libblas-dev \ | ||
liblapack-dev \ | ||
wget \ | ||
openjdk-8-jre \ | ||
openjdk-8-jdk \ | ||
&& wget \ | ||
https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh \ | ||
&& mkdir /root/.conda \ | ||
&& bash Miniconda3-py38_4.10.3-Linux-x86_64.sh -b \ | ||
&& rm -f Miniconda3-py38_4.10.3-Linux-x86_64.sh \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# copy pathml files into docker | ||
COPY setup.py README.md /opt/pathml/ | ||
COPY pathml/ /opt/pathml/pathml | ||
COPY tests/ /opt/pathml/tests | ||
|
||
# install pathml and deepcell | ||
RUN pip3 install --upgrade pip \ | ||
&& pip3 install numpy==1.19.5 \ | ||
&& pip3 install python-bioformats==4.0.0 deepcell /opt/pathml/ pytest | ||
|
||
# run tests to verify container | ||
WORKDIR /opt/pathml | ||
RUN python3 -m pytest /opt/pathml/tests/ -m "not slow" | ||
|
||
WORKDIR /home/pathml | ||
|
||
# set up jupyter lab | ||
RUN pip3 install jupyter -U && pip3 install jupyterlab | ||
EXPOSE 8888 | ||
ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--no-browser"] |
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
License: GNU GPL 2.0 | ||
""" | ||
|
||
__version__ = "2.0.1" | ||
__version__ = "2.0.dev1" |
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