Skip to content

Commit 62559d3

Browse files
authored
Publish docker image (PolusAI#302)
1 parent 0de7798 commit 62559d3

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish REST API Docker
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- v[0-9]+.[0-9]+.[0-9]+
8+
- v[0-9]+.[0-9]+.[0-9]+-dev[0-9]+
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout 🛎️
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Docker Buildx 🐳
19+
uses: docker/setup-buildx-action@v1
20+
21+
- name: Get Tag
22+
run: echo "tag=${{ github.ref_name }}" >> $GITHUB_ENV
23+
24+
- name: Print Tag
25+
run: echo "Publishing with tag ${{ env.tag }}"
26+
27+
- name: Login to Docker Hub
28+
uses: docker/login-action@v3
29+
with:
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_TOKEN }}
32+
33+
- name: Publish Sophios Container 🐳
34+
uses: docker/build-push-action@v5
35+
with:
36+
context: .
37+
file: ./docker/Dockerfile_ubuntu_REST
38+
push: true
39+
tags: polusai/sophios-rest-api:${{ env.tag }}
40+

docker/Dockerfile_ubuntu_REST

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ RUN apt update && \
88
apt autoremove -y && \
99
rm -rf /var/lib/apt/lists/*
1010

11-
COPY . /workflow-inference-compiler
12-
WORKDIR /workflow-inference-compiler
11+
COPY . /sophios
12+
WORKDIR /sophios
1313

14-
RUN pip3 install /workflow-inference-compiler --no-cache-dir
14+
RUN pip3 install /sophios --no-cache-dir
1515

1616
# Then run the sophios REST API through port 3000
1717
EXPOSE 3000

docker/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
version: '0.0.1'
1+
version: '0.2.1'
22
services:
33
fastapi-app:
4-
image: vjaganat90/sophios-rest-api:0.0.1
4+
image: polusai/sophios-rest-api:0.2.1
55
ports:
66
- "3000:3000"
77
environment:

0 commit comments

Comments
 (0)