|
| 1 | +FROM --platform=x86_64 python:3.11 |
| 2 | + |
| 3 | +RUN apt update |
| 4 | +# Install tools necessary used to install samtools and htslib so we can configure fasta files for genomic assembly. |
| 5 | +RUN apt-get clean && apt-get update && apt-get install -y \ |
| 6 | + postgresql-client \ |
| 7 | + build-essential \ |
| 8 | + curl \ |
| 9 | + git \ |
| 10 | + libbz2-dev \ |
| 11 | + libcurl4-openssl-dev \ |
| 12 | + libgsl0-dev \ |
| 13 | + liblzma-dev \ |
| 14 | + libncurses5-dev \ |
| 15 | + libperl-dev \ |
| 16 | + libssl-dev \ |
| 17 | + zlib1g-dev \ |
| 18 | + && rm -rf /var/lib/apt/lists/* |
| 19 | + |
| 20 | +# download and install blat executable |
| 21 | +WORKDIR /usr/bin |
| 22 | +RUN wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/blat/blat |
| 23 | +RUN chmod +x blat |
| 24 | + |
| 25 | +# set dcd_mapping resources directory and download reference file |
| 26 | +WORKDIR /home/.local/share/dcd_mapping |
| 27 | +ENV DCD_MAPPING_RESOURCES_DIR=/home/.local/share/dcd_mapping |
| 28 | +RUN curl -LJO https://hgdownload.cse.ucsc.edu/goldenpath/hg38/bigZips/hg38.2bit |
| 29 | + |
| 30 | +# Install samtools and htslib. |
| 31 | +ARG htsversion=1.19 |
| 32 | +RUN curl -L https://github.com/samtools/htslib/releases/download/${htsversion}/htslib-${htsversion}.tar.bz2 | tar xj && \ |
| 33 | + (cd htslib-${htsversion} && ./configure --enable-plugins --with-plugin-path='$(libexecdir)/htslib:/usr/libexec/htslib' && make install) && \ |
| 34 | + ldconfig && \ |
| 35 | + curl -L https://github.com/samtools/samtools/releases/download/${htsversion}/samtools-${htsversion}.tar.bz2 | tar xj && \ |
| 36 | + (cd samtools-${htsversion} && ./configure --with-htslib=system && make install) && \ |
| 37 | + curl -L https://github.com/samtools/bcftools/releases/download/${htsversion}/bcftools-${htsversion}.tar.bz2 | tar xj && \ |
| 38 | + (cd bcftools-${htsversion} && ./configure --enable-libgsl --enable-perl-filters --with-htslib=system && make install) |
| 39 | + |
| 40 | +RUN mkdir /usr/src/app |
| 41 | +WORKDIR /usr/src/app |
| 42 | +COPY . . |
| 43 | + |
| 44 | +RUN pip install -e '.[dev,tests]' |
| 45 | +# use polars-lts-cpu to avoid issues with x86 emulation on arm machine |
| 46 | +RUN pip install -U polars-lts-cpu |
| 47 | +# install gene normalizer with pg dependencies. TODO: can the pg dependencies be specified in pyproject.toml? |
| 48 | +#RUN pip install 'gene-normalizer[pg]' |
| 49 | +ENV PYTHONUNBUFFERED 1 |
| 50 | + |
| 51 | +ENV PYTHONPATH "${PYTHONPATH}:/usr/src/app/src" |
0 commit comments