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"]