Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish docker image #302

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/publish_rest_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish REST API Docker

on:
workflow_dispatch:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-dev[0-9]+

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Set up Docker Buildx 🐳
uses: docker/setup-buildx-action@v1

- name: Get Tag
run: echo "tag=${{ github.ref_name }}" >> $GITHUB_ENV

- name: Print Tag
run: echo "Publishing with tag ${{ env.tag }}"

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Publish Sophios Container 🐳
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile_ubuntu_REST
push: true
tags: polusai/sophios-rest-api:${{ env.tag }}

6 changes: 3 additions & 3 deletions docker/Dockerfile_ubuntu_REST
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ RUN apt update && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*

COPY . /workflow-inference-compiler
WORKDIR /workflow-inference-compiler
COPY . /sophios
WORKDIR /sophios

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

# Then run the sophios REST API through port 3000
EXPOSE 3000
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '0.0.1'
version: '0.2.1'
services:
fastapi-app:
image: vjaganat90/sophios-rest-api:0.0.1
image: polusai/sophios-rest-api:0.2.1
ports:
- "3000:3000"
environment:
Expand Down
Loading