Skip to content

Commit

Permalink
Merge pull request #5 from Tony-xy-Liu/dev
Browse files Browse the repository at this point in the history
update master
  • Loading branch information
Tony-xy-Liu authored Sep 21, 2023
2 parents 11bb023 + 66d17e0 commit 260df73
Show file tree
Hide file tree
Showing 24 changed files with 2,369 additions and 646 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
!/src
/src/**/__pycache__
/src/*.egg-info
!/envs
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
__pycache__

.idea/
*_env/
*.sif
*.egg-info

tests/test_data/FabFos_DB/
trim_sequences.fasta.*

/dist
/build
/conda_build
/conda_recipe/*
!/conda_recipe/compile_recipe.py
!/conda_recipe/meta_template.yaml
/data
/scratch
/docker/src
/secrets
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ARG CONDA_ENV=fabfos

FROM condaforge/mambaforge as build-env
# https://mamba.readthedocs.io/en/latest/user_guide/mamba.html

# scope var from global
ARG CONDA_ENV
COPY ./envs/base.yml /opt/env.yml
# Create conda environment:
# name must match what is in conda.yml
RUN mamba env create --no-default-packages -n $CONDA_ENV -f /opt/env.yml\
&& mamba clean -afy

# use a smaller runtime image
# jammy is ver. 22.04 LTS
# https://wiki.ubuntu.com/Releases
FROM ubuntu:jammy
# scope var from global
ARG CONDA_ENV
COPY --from=build-env /opt/conda/envs/${CONDA_ENV} /opt/conda/envs/${CONDA_ENV}
ENV PATH /opt/conda/envs/${CONDA_ENV}/bin:$PATH

COPY ./src/fabfos /app/fabfos_src
RUN echo "python -m fabfos_src \$@" >/app/fabfos && chmod +x /app/fabfos
ENV PATH /app:$PATH
ENV PYTHONPATH /app:$PYTHONPATH

# Singularity uses tini, but raises warnings
# we set it up here correctly for singularity
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

## We do some umask munging to avoid having to use chmod later on,
## as it is painfully slow on large directores in Docker.
RUN old_umask=`umask` && \
umask 0000 && \
umask $old_umask

# singularity doesn't use the -s flag, and that causes warnings
ENTRYPOINT ["/tini", "-s", "--"]
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

Loading

0 comments on commit 260df73

Please sign in to comment.