Skip to content

Commit

Permalink
Merge branch 'main' of github.com:abdeladim-s/subsai
Browse files Browse the repository at this point in the history
  • Loading branch information
absadiki committed Dec 26, 2024
2 parents 1370cfb + 2942b85 commit a62c23e
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 14 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: ci
name: mkdocs
on:
push:
branches:
- master
- main
pull_request:

permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-macros-plugin
- run: pip install mkdocs-material
- run: pip install mkdocstrings[python]
- run: pip install black
- run: mkdocs gh-deploy --force
- run: mkdocs build
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: mkdocs gh-deploy --force
56 changes: 56 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Docker image

on:
push:
pull_request:

jobs:
docker_image:
name: Build and push Docker image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
if: env.DOCKER_USERNAME != ''
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_USERNAME != '' && format('{0}/subsai', secrets.DOCKER_USERNAME) || '' }}
ghcr.io/${{ github.repository_owner }}/subsai
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ COPY ./assets ./assets

RUN pip install .

EXPOSE 8501

ENTRYPOINT ["python", "src/subsai/webui.py", "--server.fileWatcherType", "none", "--browser.gatherUsageStats", "false"]

16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,16 @@ Simple examples can be found in the [examples](https://github.com/absadiki/subsa
</a>
# Docker
1. Make sure that you have `docker` installed.
2. Clone and `cd` to the repository
3. ```docker compose build```
4. ```docker compose run -p 8501:8501 -v /path/to/your/media_files/folder:/media_files subsai-webui # subsai-webui-cpu for cpu only```
6. You can access your media files through the mounted `media_files` folder.
* Make sure that you have `docker` installed.
* Prebuilt image
1. ```docker pull absadiki/subsai:main```
2. ```docker run --gpus=all -p 8501:8501 -v /path/to/your/media_files/folder:/media_files absadiki/subsai:main```
* Build the image locally
1. Clone and `cd` to the repository
2. ```docker compose build```
3. ```docker compose run -p 8501:8501 -v /path/to/your/media_files/folder:/media_files subsai-webui # subsai-webui-cpu for cpu only```
* You can access your media files through the mounted `media_files` folder.
# Notes
* If you have an NVIDIA graphics card, you may need to install [cuda](https://docs.nvidia.com/cuda/#installation-guides) to use the GPU capabilities.
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ faster_whisper
whisperx @ git+https://github.com/m-bain/whisperx.git
stable-ts==2.13.3
openai
transformers
transformers
numpy<2

0 comments on commit a62c23e

Please sign in to comment.