Spaces:
Sleeping
Sleeping
File size: 2,089 Bytes
0bb29b2 c73c351 0bb29b2 c73c351 a07a154 4233e07 0bb29b2 19a9fc3 4233e07 19a9fc3 a07a154 0bb29b2 d2f2166 4233e07 a07a154 4233e07 c73c351 0bb29b2 c73c351 a07a154 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | FROM mambaorg/micromamba:1.5.10
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
COPY --chown=$MAMBA_USER:$MAMBA_USER requirements.txt /tmp/requirements.txt
# ncbi-amrfinderplus and blast (BLAST+) are added here. Without them the app
# has no AMR or virulence detector available, which is the error this
# Dockerfile revision fixes.
RUN micromamba create -y -n genomics -c conda-forge -c bioconda \
python=3.11 \
pip \
perl=5.32.1 \
prokka=1.14.6 \
perl-xml-simple=2.25 \
perl-xml-parser \
ncbi-amrfinderplus \
blast \
streamlit \
pandas \
biopython \
&& micromamba clean --all --yes
RUN micromamba run -n genomics python -c "import sys; print(sys.version)"
RUN micromamba run -n genomics prokka --version
RUN micromamba run -n genomics perl -MXML::Simple -e "print qq(XML::Simple OK\n)"
# AMRFinderPlus ships without its reference database. It must be downloaded
# once, here, during the build, because the running container has no
# guaranteed outbound internet access and the app itself never calls
# 'amrfinder -u'. Skipping this step is what produces the "No AMR or
# virulence detector is available" message at runtime.
RUN micromamba run -n genomics amrfinder -u
RUN micromamba run -n genomics amrfinder --version
RUN micromamba run -n genomics amrfinder --list_organisms
# BLAST+ confirmation. This is the optional path the app falls back to when
# a user uploads their own VFDB or AMR reference FASTA instead of relying on
# AMRFinderPlus's built-in database.
RUN micromamba run -n genomics blastn -version
RUN micromamba run -n genomics makeblastdb -version
RUN micromamba run -n genomics pip install --no-cache-dir -r /tmp/requirements.txt
COPY --chown=$MAMBA_USER:$MAMBA_USER . /app
EXPOSE 7860
CMD ["micromamba", "run", "-n", "genomics", "streamlit", "run", "app.py", \
"--server.port=7860", "--server.address=0.0.0.0", \
"--server.enableXsrfProtection=false", "--server.enableCORS=false", \
"--server.maxUploadSize=200"] |