Skip to content

Commit

Permalink
docker release updated
Browse files Browse the repository at this point in the history
  • Loading branch information
asabya committed Sep 12, 2023
1 parent 9f0cf69 commit 742a3b3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Docker image

defaults:
run:
shell: bash

on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: fairdatasociety/huggingface-vectorizer

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ These instructions will help you set up and run the server on your local machine
1. Clone the repository:

```bash
git clone https://github.com/onepeerlabs/huggingface-embeddings.git
cd your-server
git clone https://github.com/fairDataSociety/huggingface-vectorizer.git
cd huggingface-vectorizer
```

2. Install the required Python packages:
Expand All @@ -41,13 +41,13 @@ By default, the server will listen on port 9876. You can customize the port by m
You can also run the server in a Docker container. First, build the Docker image:

```bash
docker build -t onepeerlabs/huggingface-embeddings .
docker build -t fairdatasociety/huggingface-vectorizer .
```

Run the container:

```bash
docker run -p 9876:9876 onepeerlabs/huggingface-embeddings --model-name sentence-transformers/all-MiniLM-L6-v2
docker run -p 9876:9876 fairdatasociety/huggingface-vectorizer --model-name sentence-transformers/all-MiniLM-L6-v2
```

### API Endpoints
Expand Down

0 comments on commit 742a3b3

Please sign in to comment.