Download Dockerfile from Syam26/ec-classifier-v3: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/Syam26/ec-classifier-v3/resolve/main/Dockerfile
- Command line
-
hf download hf://Syam26/ec-classifier-v3/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/Syam26/ec-classifier-v3/resolve/main/Dockerfile
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"] | |