-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development image to test PopPunk branches #50
Changes from 13 commits
054bc41
e9acf2d
f5b8ab6
996b8bb
ae8e61d
180e907
a963269
5d05f6c
a2aa01c
f429068
35ed678
34e158f
a1ac4e7
e0203a7
912047a
a2dc8dd
55b5c50
9fb3c5b
bfc77ac
e22937c
fbfebb4
5cf6820
0200a4b
b69e2a1
cc62344
d84fb09
dfeeacb
24f1611
f9b363b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -101,3 +101,19 @@ Testing can be done in a second terminal (make sure to activate 'beebop_py') by | |||||||||||||||
``` | ||||||||||||||||
TESTING=True poetry run pytest | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
### Use/Deploy specific version of PopPUNK | ||||||||||||||||
|
||||||||||||||||
To use deploy a specific version/commit/branch of PopPUNK, you can update `RUN pip install git+https://github.com/bacpop/[email protected]#egg=PopPUNK ` | ||||||||||||||||
in `DockerFile.dev` with the desired version/commit/branch. | ||||||||||||||||
|
||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think making a specific reference to
Suggested change
|
||||||||||||||||
The new images built with `/docker/build` will have a *-dev* postfix. | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The build script is always building both prod and dev branches, right? It feels like maybe they should be in separate scripts, or maybe there's a conditional for building the dev image since you won't always need to build it, in every branch. |
||||||||||||||||
|
||||||||||||||||
### Local Development | ||||||||||||||||
|
||||||||||||||||
You can build the image with `/docker/build`, this new image can now be used by Beebop. | ||||||||||||||||
|
||||||||||||||||
### Deployment | ||||||||||||||||
|
||||||||||||||||
A pull request can be created so buildkite pushes the images to the docker hub. | ||||||||||||||||
Then on the `beebop-deploy` the api image can be updated with the new dev image. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM continuumio/miniconda3 | ||
|
||
# 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 | ||
|
||
# Update PopPUNK to desired version | ||
RUN pip install git+https://github.com/bacpop/[email protected]#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 ["bash", "-c", "mamba run --no-capture-output -n base poetry run waitress-serve --port=5000 'beebop.app:app'"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the next two sections are about this top, so this should be a higher level heading.