Code Monkey home page Code Monkey logo

Comments (4)

chklovski avatar chklovski commented on August 24, 2024 1

Thank you, that was very helpful. I've integrated some basic CI testing now. The docker file is still incomplete, but will work on that shortly.

from checkm2.

nick-youngblut avatar nick-youngblut commented on August 24, 2024

A dockerfile that builds:

FROM mambaorg/micromamba:1.1.0

USER root
RUN apt-get update && \
    apt-get install -y build-essential git && \
    apt-get clean && \
    apt-get purge && \
    rm -rf /var/lib/apt/lists/* /tmp/*

USER $MAMBA_USER
ARG MAMBA_DOCKERFILE_ACTIVATE=1
COPY --chown=$MAMBA_USER:$MAMBA_USER env.yaml /tmp/env.yaml
RUN micromamba install -y -n base -f /tmp/env.yaml && \
    micromamba clean --all --yes

RUN git clone --recursive https://github.com/chklovski/checkm2.git && \
    cd checkm2 && \
    python setup.py install && \
    cd .. && rm -rf checkm2

ENTRYPOINT ["/usr/local/bin/_entrypoint.sh", "checkm2", "-h"]

...in case https://github.com/chklovski/CheckM2/blob/main/docker/Dockerfile.in isn't working.

More generally, it would be good to point out the OS-level dependencies (e.g., gcc).

from checkm2.

nick-youngblut avatar nick-youngblut commented on August 24, 2024

If you'd like to set up CI for the repo, this action should get you most of the way there:

name: CheckM2

on: [push, pull_request]

jobs:
  build:
    name: build (${{ matrix.python-version }}, ${{ matrix.os }})
    runs-on: ubuntu-latest
    env:
      DATADIR: data
    strategy:
      matrix:
        python-version: [3.9]
        build_type: [Release]
        compiler: [g++-9]
        include:
          - compiler: g++-9
    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
    - name: Checkout submodules
      run: git submodule update --init --recursive
    - uses: conda-incubator/setup-miniconda@v2
      with:
        miniconda-version: 'latest'
        auto-update-conda: true
        mamba-version: "*"
        python-version: ${{ matrix.python-version }}
        channels: conda-forge,bioconda
        environment-file: checkm2.yml
        activate-environment: checkm2
    - name: package install
        shell: bash -l {0}
        working-directory: ${{runner.workspace}}/checkm2/
        run: |
          python setup.py install
    - name: checkm2 unit tests
        shell: bash -l {0}
        working-directory: ${{runner.workspace}}/checkm2/tests
        run: |
          pytest [checkm unit tests]
    - name: checkm2 CLI tests
        shell: bash -l {0}
        working-directory: ${{runner.workspace}}/checkm2/tests
        run: |
          checkm2 -h
          checkm2 predict -h

from checkm2.

nick-youngblut avatar nick-youngblut commented on August 24, 2024

I found that the grpcio dependency issue is not a problem if python=3.8 is used.
If python=3.9 is used, then conda installs a version of grpcio much more recent than 1.32.0.
So, python setup.py install with the python=3.9 conda env results in pip trying to install grpcio=1.32.0, and that leads to the issues.

@chklovski I'm guessing that you've been developing checkm2 with python3.8?

This is an instance where CI testing using multiple versions of python can be very helpful.

from checkm2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.