-
Notifications
You must be signed in to change notification settings - Fork 1
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 #34 from bento-platform/features/dockerize
v0.7.0 rc-1
- Loading branch information
Showing
6 changed files
with
86 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build and push bento_drs | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-push: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Bento build action | ||
uses: bento-platform/bento_build_action@v0.6 | ||
with: | ||
registry: ghcr.io | ||
registry-username: ${{ github.actor }} | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} | ||
image-name: ghcr.io/bento-platform/bento_drs | ||
development-dockerfile: dev.Dockerfile | ||
dockerfile: Dockerfile |
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,20 @@ | ||
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2022.10.11 | ||
|
||
# TODO: change USER | ||
USER root | ||
|
||
RUN apt install gcc libffi-dev -y | ||
|
||
RUN echo "Building DRS in Production Mode"; | ||
WORKDIR /drs/bento_drs | ||
RUN mkdir /wes && \ | ||
mkdir -p /drs/bento_drs/data/obj && \ | ||
mkdir -p /drs/bento_drs/data/db; | ||
COPY requirements.txt requirements.txt | ||
RUN ["pip", "install", "-r", "requirements.txt"] | ||
COPY . . | ||
|
||
# Run | ||
WORKDIR /drs/bento_drs/chord_drs | ||
COPY startup.sh ./startup.sh | ||
CMD ["sh", "startup.sh"] |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = chord_drs | ||
version = 0.6.0 | ||
version = 0.7.0 | ||
authors = Simon Chénard, David Lougheed | ||
author_emails = simon.chenard2@mcgill.ca, david.lougheed@mail.mcgill.ca |
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,18 @@ | ||
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2022.10.11 | ||
|
||
# TODO: change USER | ||
USER root | ||
|
||
RUN apt install libffi-dev -y | ||
|
||
RUN echo "Building DRS in Development Mode"; | ||
WORKDIR /drs/bento_drs | ||
RUN mkdir /wes && \ | ||
mkdir -p /drs/bento_drs/data/obj && \ | ||
mkdir -p /drs/bento_drs/data/db; | ||
COPY ./requirements.txt . | ||
RUN ["pip", "install", "debugpy", "-r", "requirements.txt"] | ||
|
||
# Run | ||
WORKDIR /drs/bento_drs/chord_drs | ||
COPY startup.sh ./startup.sh |
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,13 @@ | ||
cd ../data; | ||
mkdir -p db; | ||
mkdir -p obj; | ||
|
||
cd ../chord_drs; | ||
flask db upgrade; | ||
|
||
# call variant endpoint to trigger init | ||
cd ..; | ||
|
||
# using 1 worker, multiple threads | ||
# see https://stackoverflow.com/questions/38425620/gunicorn-workers-and-threads | ||
gunicorn chord_drs.app:application -w 1 --threads $(expr 2 \* $(nproc --all) + 1) -b 0.0.0.0:5000 |