Skip to content
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

Build a docker image in the pipeline #14

Merged
merged 37 commits into from
Apr 12, 2020
Merged

Conversation

thequicksort
Copy link
Contributor

Update: Sorry for the lateness, I turns out Github actions double-archive if your build output is already an archive file, which makes the testing steps here a little more complicated.

Description

  • Building a docker image as part of our build process. Running nix-build -A docker locally will return a path to a docker image in the Nix store. You can copy this artifact wherever you'd like.

  • Pushing to master will now result in a docker image being built.

I also refactored the dependency structure a little bit. Now all dependencies are managed in one file, as I figure this will be easier as it mimics setup.py/requirements.txt (if you disagree, let me know!).

Once we're ready to merge, I'll switch the build branch over from jdunstan/docker-image to master.

Issues

#6

Testing

Test case: Docker image produced by

  • Download Docker, if it's not already installed.

  • Download the Poretitioner docker image here, which was produced automatically by our build pipeline, to a known path, hereto referred to as DOCKER_IMAGE_PATH

  • Load the image into docker, e.g.

docker load < $DOCKER_IMAGE_PATH
  • Run the image
docker run 
  • Expected

Screen Shot 2020-04-10 at 12 50 16 AM

  • On Centos Linux, you may see some stderr lines about GTK, but this also happens from random applications like opening emacs in graphical mode. I don't think it's related to our code.

Jessica Dunstan and others added 30 commits March 27, 2020 20:33
- Created a script 'bootstrap_dev.sh' that installs Nix and all project dependencies for you.
    - To run it, from main poretitioner git directory, run:
    - $ export PORETITIONER_DIR=/home/jdunstan/Developer/poretitioner; bash ./bootstrap_dev

- Added project directory structure stubs.

#2
- Created a script 'bootstrap_dev.sh' that installs Nix and all project dependencies for you.
    - To run it, from main poretitioner git directory, run:
    - $ export PORETITIONER_DIR=/home/jdunstan/Developer/poretitioner; bash ./bootstrap_dev

- Added project directory structure stubs.
- Introduce test runner and code coverage.
- Set up pre-commit hooks to run before git commit and push.
- Create setup.py and add a LICENSE file (using MIT by default, subject to change).

#4
- Introduce test runner and code coverage.
- Set up pre-commit hooks to run before git commit and push.
- Create setup.py and add a LICENSE file (using MIT by default, subject to change).

#4
…ilable on VM. Final size: 302.1 MB (compressed)
I really wish github offered a way to test workflow changes without polluting the branch with extraneous commits -__-. I'm sorry.
I wish Github offered a way to test main.yml without pushing
I really wish this were easy to test locally...
I really wish this were easier to test
@thequicksort thequicksort self-assigned this Apr 10, 2020
@kdoroschak
Copy link
Member

Feel free to merge whenever you're ready; my changes won't conflict with this in the slightest.

@thequicksort thequicksort changed the title (Sorry, not quite ready for review yet) Build a docker image from the build pipeline Build a docker image in the pipeline Apr 11, 2020
@thequicksort thequicksort merged commit 4f15406 into master Apr 12, 2020
@thequicksort thequicksort deleted the jdunstan/docker-image branch April 12, 2020 01:37
kdoroschak pushed a commit that referenced this pull request Apr 27, 2020
Run "nix-build" or "nix-build -A docker" to build a docker image. Run "nix-build -A app" to build Poretitioner locally without Docker.

#14
kdoroschak added a commit that referenced this pull request Apr 28, 2020
* begin quantifier refactor; absolutely does not run

attempting to get a basic test set up for calc_time_until_capture. test comes from 20180618 data, run on the original version. moved voltage utility function to segmenter.

* rewrite calc_time_until_capture to be conceptually easier to follow

* fix relative import .

* remove orig version of calc_time_until_capture

* add init so pytest can find tests; minor flake compliance

* add test for get_overlapping_regions; fixed edge case bug

* docstrings

* update parameterized fn

* remove calc_time_until_capture_blockages

* minor flake change, star import, & add test file

* open_pore --> _channel; docstrings raw utils; rm multi path choice raw utils

* python 3 import

* fix import

* method to create the capture fast5 + tests

* rm plotting in utils

* rm example test

* add filters (+tests) & find capture fn (untested)

* make fn call more generic

* window-only segmentation core fn

* functional segmenter + tests + parallel

* finish doc for segment, move fn to raw_signal_utils

* rm placeholder test

* reorganize module names for downstream changes

* Build docker image

* Upload the docker image as a build artifact

* rewrite calc_time_until_capture to be conceptually easier to follow

* fix relative import .

* remove orig version of calc_time_until_capture

* add init so pytest can find tests; minor flake compliance

* add test for get_overlapping_regions; fixed edge case bug

* Build the application's docker image 🐳 (#14) 

Run "nix-build" or "nix-build -A docker" to build a docker image. Run "nix-build -A app" to build Poretitioner locally without Docker.

#14

* Adding build steps to the Readme

* Added more build steps

* Update Readme.md

* Added NanoporTER paper

* Update Readme.md

* docstrings

* update parameterized fn

* remove calc_time_until_capture_blockages

* minor flake change, star import, & add test file

* open_pore --> _channel; docstrings raw utils; rm multi path choice raw utils

* python 3 import

* fix import

* Import pytorch and torchvision (#25)

Add pytorch dependency.

#8

Co-authored-by: Jessica Dunstan <jdunstan@cs.washington.edu>

* method to create the capture fast5 + tests

* Update Readme.md

* Added continuous integration badge

* Add uninstall steps

* rm plotting in utils

* rm example test

* add filters (+tests) & find capture fn (untested)

* make fn call more generic

* window-only segmentation core fn

* functional segmenter + tests + parallel

* finish doc for segment, move fn to raw_signal_utils

* rm placeholder test

* reorganize module names for downstream changes

Co-authored-by: J.D <thequicksort@gmail.com>
Co-authored-by: Jessica Dunstan <jdunstan@cs.washington.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants