Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool dockerization #122

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git/
docs/
Dockerfile
39 changes: 39 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: dockerhub

on:
release:
types: [published]

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Remove leading v from the release tag
id: rmv
run: |
sansv=$(echo ${{ github.event.release.tag_name }} | tr -d v)
echo "::set-output name=tag::${{ github.repository }}:$sansv"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ${{steps.rmv.outputs.tag}}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

18 changes: 18 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ports:
- port: 6080
onOpen: open-preview
tasks:
- init: |
eval $(command gp env -e)
pip install synapseclient
synapse -u "$SYN_USER" -p "$SYN_TOKEN" \
get syn27202293 --downloadLocation /workspace/testdata
synapse -u "$SYN_USER" -p "$SYN_TOKEN" \
get syn27202298 --downloadLocation /workspace/testdata/csv
synapse -u "$SYN_USER" -p "$SYN_TOKEN" \
get syn28413455 --downloadLocation /workspace/testdata/mask
synapse -u "$SYN_USER" -p "$SYN_TOKEN" \
get syn27202398 --downloadLocation /workspace/testdata/seg
synapse -u "$SYN_USER" -p "$SYN_TOKEN" \
get syn27204544 --downloadLocation /workspace/testdata/tif
cp /workspace/cylinter/cylinter/config.yml /workspace/testdata
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM gitpod/workspace-full-vnc:latest

# Qt5 graphics libraries for napari
RUN sudo apt-get update && \
sudo apt-get install -y \
libpython3.8-dev \
qtbase5-dev \
qtchooser \
qt5-qmake \
qtbase5-dev-tools && \
sudo rm -rf /var/lib/apt/lists/*

RUN python -m pip install "napari[all]"

# Install cylinter
COPY --chown=gitpod:gitpod . /app
RUN python -m pip install /app

RUN chmod +x /app/cylinter/start.sh
CMD [ "/bin/bash", "-ci", "/app/cylinter/start.sh" ]
4 changes: 2 additions & 2 deletions cylinter/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# GENERAL PROGRAM CONFIGURATIONS

inDir: /Users/<username>/Desktop/cylinter_demo
inDir: /data
# Path to CyLinter input directory containing multi-channel
# image files (TIFF or OME-TIFF), segmentation outlines (OME-TIFF),
# segmentation masks (TIFF), and corresponding single-cell feature tables (CSV)

outDir: /Users/<username>/Desktop/cylinter_demo/output
outDir: /data/output
# CyLinter output directory. Path is created if it does not exist.

sampleMetadata:
Expand Down
4 changes: 4 additions & 0 deletions cylinter/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

/usr/bin/gp-vncsession
cylinter /data/config.yml
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

with open("README.md", "r", encoding="utf-8") as fh:
with open("ReadMe.md", "r", encoding="utf-8") as fh:
LONG_DESCRIPTION = fh.read()

requires = [
Expand Down