Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Migrate x-as-service to jina 0.4.1 #122

Merged
merged 1 commit into from
Aug 1, 2020

Conversation

bwanglzu
Copy link
Member

@bwanglzu bwanglzu commented Jul 30, 2020

This PR was aligned with issue #116 , migrate x-as-service example for Jina 0.4.1 release, includes:

  1. Code migration based on migration guide.
  2. Minor changes on Readme.

To run this example, you should build pytorch-transformer image locally using jina 0.4.1 with Dockerfile:

FROM pytorch/pytorch:1.4-cuda10.1-cudnn7-runtime

RUN pip install transformers --no-cache-dir --compile && \
    python -c "from transformers import *; x='bert-base-uncased'; BertModel.from_pretrained(x); BertTokenizer.from_pretrained(x)"

RUN pip install git+https://github.com/jina-ai/jina.git/@master

ENTRYPOINT ["jina", "pod", "--uses", "TransformerTorchEncoder"]

And command:

docker build -f Dockerfile -t jinaai/hub.executors.encoders.nlp.transformers-pytorch .

@bwanglzu bwanglzu added the enhancement New feature or request label Jul 30, 2020
@bwanglzu bwanglzu self-assigned this Jul 30, 2020
Copy link
Member

@nan-wang nan-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM👍

@nan-wang nan-wang merged commit bdafd33 into master Aug 1, 2020
@nan-wang nan-wang deleted the chore-x-as-service-migrate-116 branch August 1, 2020 05:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants