Skip to content

Commit

Permalink
feat: support creating a HuggingFace model (#113)
Browse files Browse the repository at this point in the history
Because

-  support creating a classification model from HuggingFace repository

This commit

- add HuggingFace model definition and HuggingFace model creation
  • Loading branch information
Phelan164 authored Jun 28, 2022
1 parent bef879e commit 1577d87
Show file tree
Hide file tree
Showing 15 changed files with 1,482 additions and 28 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN pip3 install --no-cache --upgrade pip setuptools
RUN apk add --no-cache libffi-dev build-base py3-pip python3-dev
RUN apk add --no-cache libgit2-dev py3-pygit2
RUN pip3 install dvc[gs]
RUN pip3 install transformers pillow torch onnxruntime

WORKDIR /${SERVICE_NAME}

Expand Down
9 changes: 9 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,13 @@ COPY . .

RUN go install github.com/cosmtrek/air@latest

RUN apt-get update
RUN apt-get -y install python3
RUN apt-get -y install python3-setuptools
RUN apt-get -y install python3-pip
RUN pip3 install dvc[gs]
RUN pip3 install transformers pillow torch onnxruntime
RUN apt-get -y install git git-lfs


ENTRYPOINT ["tail", "-f", "/dev/null"]
7 changes: 7 additions & 0 deletions assets/huggingface-vit-template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
Task: Classification
Tags:
- Classification
---

# Template repo for HuggingFace model
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: "huggingface-infer"
platform: "onnxruntime_onnx"
max_batch_size: 32
version_policy: { all { }}
Loading

0 comments on commit 1577d87

Please sign in to comment.