-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerize and Add Release-Push Workflow (#688)
--------- Co-authored-by: Andrew Lapp <[email protected]>
- Loading branch information
Showing
7 changed files
with
81 additions
and
11 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,37 @@ | ||
name: Release Docker | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: 'Release Tag (for manual dispatch)' | ||
required: false | ||
default: 'latest' | ||
jobs: | ||
release-job: | ||
name: Build and publish on Docker Hub | ||
runs-on: ubuntu-latest | ||
environment: release | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: | | ||
outlinesdev/outlines:latest | ||
outlinesdev/outlines:${{ github.event.release.tag_name }} | ||
build-args: | | ||
BUILDKIT_CONTEXT_KEEP_GIT_DIR=true | ||
- name: Clean docker cache | ||
run: docker system prune --all --force |
4 changes: 1 addition & 3 deletions
4
.github/workflows/release.yml → .github/workflows/release_pypi.yaml
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,17 @@ | ||
FROM python:3.10 | ||
|
||
WORKDIR /outlines | ||
|
||
RUN pip install --upgrade pip | ||
|
||
# Copy necessary build components | ||
COPY pyproject.toml . | ||
COPY outlines ./outlines | ||
|
||
# Install outlines and outlines[serve] | ||
# .git required by setuptools-scm | ||
RUN --mount=source=.git,target=.git,type=bind \ | ||
pip install --no-cache-dir .[serve] | ||
|
||
# https://outlines-dev.github.io/outlines/reference/vllm/ | ||
ENTRYPOINT python3 -m outlines.serve.serve |
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
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