ec-classifier-v3 / Dockerfile
Syam26's picture
Upload folder using huggingface_hub
cab6030 verified
Raw History Blame Contribute Delete
1.06 kB
FROM python:3.11-slim-bookworm
# libgomp is the OpenMP runtime LightGBM links against; the slim image does not ship it.
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# DIAMOND provides the homology search. 2.2.8 matches training and has --hit-membuf.
ADD https://github.com/bbuchfink/diamond/releases/download/v2.2.8/diamond-linux64.tar.gz /tmp/d.tar.gz
RUN tar -xzf /tmp/d.tar.gz -C /usr/local/bin diamond && rm /tmp/d.tar.gz && diamond version
RUN useradd --create-home --uid 1000 user
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
COPY --chown=user:user . .
# Built here, not by predict.py, so that no large file is ever written during inference.
RUN gunzip -c weights/train_db.fa.gz | diamond makedb -d weights/train --quiet \
&& chown user:user weights/train.dmnd
USER user
ENV OMP_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 MKL_NUM_THREADS=2
CMD ["python", "/app/predict.py", "--help"]