-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc23836
commit 725da58
Showing
3 changed files
with
68 additions
and
7 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,9 +1,2 @@ | ||
build | ||
test | ||
.git | ||
girder | ||
girder_annotation | ||
large_image | ||
sources | ||
utilities | ||
examples |
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,37 @@ | ||
name: Docker Package | ||
on: | ||
push: | ||
tags: "*" | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository ) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Log into the Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: token | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata for the Docker image | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push the Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: slim.Dockerfile | ||
push: ${{ github.actor != 'dependabot[bot]' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 @@ | ||
# Build wheels | ||
FROM python:3.9-slim as build | ||
|
||
# Need git for setuptools_scm | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends git \ | ||
&& apt-get purge -y --auto-remove \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /opt/build-context/ | ||
WORKDIR /opt/build-context | ||
|
||
RUN python -m pip install --upgrade pip wheel setuptools | ||
RUN sh .circleci/make_wheels.sh | ||
RUN mv ~/wheels /opt/build-context/ | ||
|
||
# Production | ||
FROM python:3.9-slim | ||
|
||
COPY --from=build /opt/build-context/wheels /opt/wheels | ||
LABEL maintainer="Kitware, Inc. <[email protected]>" | ||
LABEL repo="https://github.com/girder/large_image" | ||
# NOTE: this does not install any girder3 packages | ||
RUN pip install \ | ||
--find-links https://girder.github.io/large_image_wheels \ | ||
--find-links=/opt/wheels \ | ||
'pylibmc>=1.5.1' \ | ||
matplotlib \ | ||
pyvips \ | ||
simplejpeg \ | ||
$(ls -1 /opt/wheels/large_image*.whl) |