-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bacpop-186-v9-db-support' of https://github.com/bacpop/…
…beebop_py into bacpop-202-fallback-to-refs
- Loading branch information
Showing
10 changed files
with
138 additions
and
29 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,26 @@ | ||
name: build and push docker images | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- "*" | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to GHCR (GitHub Packages) | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
# add --with-dev to below commands to build & push the dev image | ||
- name: Build docker image | ||
run: ./docker/build | ||
- name: Push docker image | ||
run: ./docker/push |
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 was deleted.
Oops, something went wrong.
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,61 @@ | ||
FROM continuumio/miniconda3 | ||
|
||
# ensure conda does not install packages for the wrong architecture | ||
ENV CONDA_OVERRIDE_ARCHSPEC=skylake | ||
|
||
ARG POPPUNK_VERSION="v2.6.7" | ||
|
||
# Make RUN commands use the new environment: | ||
SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"] | ||
|
||
# Set up conda environment | ||
RUN conda install python=3.10 | ||
RUN conda config --append channels conda-forge && \ | ||
conda config --append channels bioconda | ||
|
||
# Install mamba: which is a faster package manager than conda | ||
RUN conda install -c conda-forge mamba | ||
RUN conda config --set channel_priority flexible | ||
|
||
#Install PopPUNK conda dependencies | ||
RUN mamba install -y -c conda-forge -y graph-tool mandrake | ||
RUN mamba install -y \ | ||
# Core data packages | ||
pandas \ | ||
requests \ | ||
networkx \ | ||
scikit-learn \ | ||
# Bioinformatics tools | ||
pp-sketchlib \ | ||
biopython \ | ||
treeswift \ | ||
rapidnj \ | ||
# Analysis tools | ||
hdbscan \ | ||
# Progress tracking | ||
tqdm \ | ||
&& mamba clean -afy | ||
|
||
# System dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
libeigen3-dev \ | ||
libhdf5-dev \ | ||
libopenblas-dev | ||
|
||
|
||
RUN pip install git+https://github.com/bacpop/PopPUNK@${POPPUNK_VERSION}#egg=PopPUNK | ||
|
||
# Poetry setup | ||
RUN pip install poetry | ||
COPY *.toml *.lock / | ||
RUN poetry config virtualenvs.create false && \ | ||
poetry install | ||
|
||
COPY . /beebop | ||
WORKDIR /beebop | ||
EXPOSE 5000 | ||
|
||
CMD ["conda", "run" ,"--no-capture-output", "-n", "base", "poetry", "run", "waitress-serve", "--port=5000", "beebop.app:app"] |
File renamed without changes.
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 |
---|---|---|
@@ -1,25 +1,24 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
REGISTRY=ghcr.io | ||
PACKAGE_ROOT=$(realpath $HERE/..) | ||
PACKAGE_NAME=beebop-py | ||
PACKAGE_ORG=mrcide | ||
PACKAGE_ORG=bacpop | ||
PACKAGE_DEV=dev | ||
|
||
# Buildkite doesn't check out a full history from the remote (just the | ||
# single commit) so you end up with a detached head and git rev-parse | ||
# doesn't work | ||
if [ "$BUILDKITE" = "true" ]; then | ||
GIT_SHA=${BUILDKITE_COMMIT:0:7} | ||
GIT_SHA=$(git -C "$PACKAGE_ROOT" rev-parse --short=7 HEAD) | ||
if [[ -v "BRANCH_NAME" ]]; then | ||
GIT_BRANCH=${BRANCH_NAME} | ||
else | ||
GIT_SHA=$(git -C "$PACKAGE_ROOT" rev-parse --short=7 HEAD) | ||
GIT_BRANCH=$(git symbolic-ref --short HEAD) | ||
fi | ||
|
||
if [ "$BUILDKITE" = "true" ]; then | ||
GIT_BRANCH=$BUILDKITE_BRANCH | ||
else | ||
GIT_BRANCH=$(git -C "$PACKAGE_ROOT" symbolic-ref --short HEAD) | ||
fi | ||
# production image | ||
TAG_SHA="${REGISTRY}/${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_SHA}" | ||
TAG_BRANCH="${REGISTRY}/${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_BRANCH}" | ||
TAG_LATEST="${REGISTRY}/${PACKAGE_ORG}/${PACKAGE_NAME}:latest" | ||
|
||
TAG_SHA="${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_SHA}" | ||
TAG_BRANCH="${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_BRANCH}" | ||
TAG_LATEST="${PACKAGE_ORG}/${PACKAGE_NAME}:latest" | ||
# development image | ||
TAG_DEV_SHA="${REGISTRY}/${TAG_SHA}-${PACKAGE_DEV}" | ||
TAG_DEV_BRANCH="${REGISTRY}/${TAG_BRANCH}-${PACKAGE_DEV}" | ||
POPPUNK_VERSION=v2.6.7 # can be version, branch or commit |
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