diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ef33c5..0fb7edc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,9 +34,23 @@ jobs: pip install -q -U pip pip install --progress-bar=off -r requirements.txt + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker build + uses: docker/build-push-action@v5 + with: + context: . + load: true + tags: covid19:latest + + - name: Check docker image run: | - docker build -t covid19 . + echo "######## DOCKER IMAGES ########" + docker images + # ensure image is actually present before moving on + docker image inspect covid19:latest && echo "--- image built and loaded" + echo "######## DOCKER IMAGES ########" - name: Run lint checks & tests run: | diff --git a/Dockerfile b/Dockerfile index 1beb6de..b3b1bcb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,15 +34,10 @@ ENV PATH=$PATH:/opt/miniconda3/bin/ # install environment's dependencies COPY environment.yml /opt/ -RUN conda env create -f /opt/environment.yml - -# install artic into conda environment "artic" -RUN git clone https://github.com/artic-network/fieldbioinformatics.git \ - && cd fieldbioinformatics \ - && git checkout 1.2.1 \ - && conda env create -f environment.yml \ - && conda run -n artic python setup.py install \ - && conda clean -a +RUN conda env create --solver libmamba --file /opt/environment.yml + +RUN conda create -n artic +RUN conda install --name artic --solver libmamba -c bioconda -c conda-forge -c defaults artic==1.2.3 # install snpeff RUN curl -k -L https://sourceforge.net/projects/snpeff/files/snpEff_v4_5covid19_core.zip/download --output snpEff_v4_5covid19_core.zip\