-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from sameeul/v021
V021
- Loading branch information
Showing
33 changed files
with
720 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM ubuntu:jammy | ||
|
||
RUN apt update && \ | ||
apt install software-properties-common -y && \ | ||
apt install curl -y && \ | ||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py && \ | ||
apt autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /sophios | ||
WORKDIR /sophios | ||
|
||
RUN pip3 install /sophios --no-cache-dir | ||
|
||
# Then run the sophios REST API through port 3000 | ||
EXPOSE 3000 | ||
|
||
CMD ["uvicorn", "sophios.api.http.restapi:app", "--host", "0.0.0.0", "--port", "3000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: '0.2.1' | ||
services: | ||
fastapi-app: | ||
image: polusai/sophios-rest-api:0.2.1 | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- PATH=$PATH | ||
command: ["uvicorn", "sophios.api.http.restapi:app", "--host", "0.0.0.0", "--port", "3000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.