generated from NCBI-Codeathons/codeathon-team-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
74 lines (62 loc) · 1.89 KB
/
Dockerfile
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM ubuntu:20.04
# Set working directory
WORKDIR /scratch
# Set environment variables
ENV DEBIAN_FRONTEND noninteractive
ENV TZ America/Chicago
# Update the package list and install necessary packages
RUN apt update && \
apt install software-properties-common -y && \
apt update && \
add-apt-repository ppa:deadsnakes/ppa -y && \
apt update && \
apt-get update && \
apt-get install -y \
build-essential \
gcc \
make \
wget \
curl \
gzip \
unzip \
libbz2-dev \
zlib1g-dev \
libncurses5-dev \
libncursesw5-dev \
liblzma-dev \
autotools-dev \
autoconf \
python3.10 \
python3.10-distutils \
python3-pip \
cython \
git \
bash
RUN apt-get install -y pkg-config python-html5lib
# directly install pip from pypa
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# make sure the image uses the correct version of Python
RUN cd /usr/bin && \
unlink python && \
ln -s /usr/bin/python3.10 python && \
unlink python3 && \
ln -s /usr/bin/python3.10 python3
# install python environment
RUN python3 -m pip install pandas polars biopython rich flytekit lxml llm
# configure LLM
RUN llm install llm-cluster
RUN llm install llm-sentence-transformers
# modify LLM source code in `llm_cluster.py` to have it accept floats
RUN rm /usr/local/lib/python3.10/dist-packages/llm_cluster.py
COPY assets/llm_cluster.py /usr/local/lib/python3.10/dist-packages/llm_cluster.py
# register the models
RUN llm sentence-transformers register all-mpnet-base-v2
RUN llm sentence-transformers register all-MiniLM-L12-v2
RUN llm sentence-transformers register multi-qa-mpnet-base-dot-v1
# install nextflow
RUN python3 -m pip install nextflow
# set cache and config directories for llm
ENV LLM_USER_PATH "/scratch/.llm/.config"
ENV HF_HOME "/scratch/.llm"
# Run a bash shell by default when the container starts
CMD ["/bin/bash"]