Skip to content

Commit

Permalink
updated to clams 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
keighrim committed Jun 5, 2023
1 parent 8f56adb commit 648cea3
Show file tree
Hide file tree
Showing 12 changed files with 350 additions and 72 deletions.
8 changes: 7 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.git/
.github/
.gitignore
bin/
build/
*~
**/*.pyc
**/__pyche__
.dockerignore
Dockerfile
ContainerFile
outerdemo.sh
wgbh-audios/
demo/results/
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/issue-apps-project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "add to `apps` GH project when a new issue is submitted"
name: "🗂 Add new issue to `apps` GHP"

on:
issues:
Expand All @@ -11,7 +11,9 @@ on:

jobs:
call-assign:
name: "🤙 Call GHP workflow"
uses: clamsproject/.github/.github/workflows/repo-issue-project.yml@main
secrets: inherit
with:
projectnum: 12

11 changes: 11 additions & 0 deletions .github/workflows/issue-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "🙆 Assign issue"

on:
create:

jobs:
call-assign:
if: github.ref_type == 'branch'
name: "🤙 Call assignment workflow"
uses: clamsproject/.github/.github/workflows/repo-issue-assign.yml@main
secrets: inherit
15 changes: 15 additions & 0 deletions .github/workflows/issue-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "🙅 Unassign assignees"

on:
issues:
types:
- closed
pull_request:
types:
- closed

jobs:
call-unassign:
name: "🤙 Call unassignment workflow"
uses: clamsproject/.github/.github/workflows/repo-issue-close.yml@main
secrets: inherit
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "📦 Publish image>ghcr, metadata>appdir"

on:
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: 'git tag to use to build an app image'
push:
tags:
- '*'

jobs:
set-version:
runs-on: ubuntu-latest
name: "🏷 Set version value"
outputs:
version: ${{ steps.output_version.outputs.version }}
steps:
- name: "📌 Set VERSION value from dispatch inputs"
id: get_version_dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
- name: "📌 Set VERSION value from pushed tag"
id: get_version_tag
if: ${{ github.event_name == 'push' }}
run: echo "VERSION=$(echo "${{ github.ref }}" | cut -d/ -f3)" >> $GITHUB_ENV
- name: "🏷 Record VERSION for follow-up jobs"
id: output_version
run: |
echo "version=${{ env.VERSION }}" >> $GITHUB_OUTPUT
publish-image:
needs: ['set-version']
name: "🤙 Call app container workflow"
uses: clamsproject/.github/.github/workflows/app-container.yml@main
secrets: inherit
with:
version: ${{ needs.set-version.outputs.version }}
arm64: false
register-appdir:
needs: ['set-version', 'publish-image']
name: "🤙 Call app registration workflow"
uses: clamsproject/apps/.github/workflows/register.yml@main
secrets: inherit
with:
repo: ${{ github.repository }}
tag: ${{ needs.set-version.outputs.version }}
container: 'ghcr.io/${{ github.repository }}:${{ needs.set-version.outputs.version }}'

164 changes: 162 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,167 @@
.idea/
# linux
.*.sw?
*~
.directory # KDE directory preferences
.Trash-* # Linux trash folder which might appear on any partition or disk

# macos
.DS_Store
.AppleDouble
.LSOverride
Icon # Icon must end with two \r
._* # Thumbnails
.DocumentRevisions-V100 # Files that might appear in the root of a volume
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.AppleDB # Directories potentially created on remote AFP share
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab # Windows Installer files
*.msi
*.msm
*.msp
*.lnk # Windows shortcuts

# idea
.idea
*.iml
out
gen

# sqlite
*.db
*.sqlite3

# java
*.class
.mtj.tmp/ # Mobile Tools for Java (J2ME)
target/ # Package Files #
*.jar
*.war
*.ear
hs_err_pid* # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml

# python byte-compiled / optimized / dll files
__pycache__/
.pytype
*.py[cod]
*$py.class

# C extensions
*.so

# python Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# python Installer logs
pip-log.txt
pip-delete-this-directory.txt

# python Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Virtual Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# ctag generated file
tags
.tags

demo/results
demo/results-old
22 changes: 22 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ghcr.io/clamsproject/clams-python-ffmpeg-tf2:1.0.2

################################################################################
# DO NOT EDIT THIS SECTION
ARG CLAMS_APP_VERSION
ENV CLAMS_APP_VERSION ${CLAMS_APP_VERSION}
################################################################################

################################################################################
# clams-python base images are based on debian distro
# install more system packages as needed using the apt manager
################################################################################

################################################################################
# main app installation
COPY ./ /app
WORKDIR /app
RUN pip3 install -r requirements.txt

# default command to run the CLAMS app in a production server
CMD ["python3", "app.py", "--production"]
################################################################################
11 changes: 0 additions & 11 deletions Dockerfile

This file was deleted.

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@

This is a CLAMS app that wraps [Brandeis-ACS](https://pypi.org/project/brandeis-acs/) tool.

## Installtion
Clone this repository and install python dependencies listed in [`requirements.txt`](requirements.txt).
Then run `app.py`.
You can run it locally (`--once` option), or run it as a web app (without `--once` option).
See `--help` message for more options.

You can also build a docker image with provided [`Dockerfile`](Dockerfile).
The docker image will run as a web app by default.
General user instruction for CLAMS apps is available at [CLAMS Apps documentation](https://apps.clams.ai/clamsapp/).
Loading

0 comments on commit 648cea3

Please sign in to comment.