Upload 2 files
Browse files- Dockerfile +52 -0
- requirements.txt +7 -0
Dockerfile
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
+
# you will also find guides on how best to write your Dockerfile
|
3 |
+
|
4 |
+
FROM continuumio/anaconda3:2024.02-1
|
5 |
+
|
6 |
+
WORKDIR /code
|
7 |
+
|
8 |
+
COPY ./requirements.txt /code/requirements.txt
|
9 |
+
|
10 |
+
RUN apt-get update
|
11 |
+
|
12 |
+
RUN apt-get install gcc -y
|
13 |
+
|
14 |
+
RUN pip install -r /code/requirements.txt
|
15 |
+
|
16 |
+
RUN conda install pytorch::faiss-gpu --yes
|
17 |
+
|
18 |
+
# Download foldseek
|
19 |
+
RUN wget 'https://drive.usercontent.google.com/download?id=1B_9t3n_nlj8Y3Kpc_mMjtMdY0OPYa7Re&export=download&authuser=0' -O /tmp/foldseek
|
20 |
+
RUN chmod +x /tmp/foldseek
|
21 |
+
|
22 |
+
# Download ProTrek model
|
23 |
+
RUN huggingface-cli download westlake-repl/ProTrek_650M_UniRef50 --repo-type model --local-dir /tmp/ProTrek_650M_UniRef50
|
24 |
+
|
25 |
+
# Download ProTrek model
|
26 |
+
RUN huggingface-cli download westlake-repl/faiss_index_ProTrek_650M_UniRef50 --repo-type dataset --local-dir /tmp/faiss_index_ProTrek_650M_UniRef50
|
27 |
+
|
28 |
+
# Set up a new user named "user" with user ID 1000
|
29 |
+
RUN useradd -m -u 1000 user
|
30 |
+
|
31 |
+
# Set home to the user's home directory
|
32 |
+
ENV HOME=/home/user \
|
33 |
+
PYTHONPATH=$HOME/app \
|
34 |
+
PYTHONUNBUFFERED=1 \
|
35 |
+
GRADIO_ALLOW_FLAGGING=never \
|
36 |
+
GRADIO_NUM_PORTS=1 \
|
37 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
38 |
+
GRADIO_THEME=huggingface \
|
39 |
+
SYSTEM=spaces
|
40 |
+
|
41 |
+
# Set the working directory to the user's home directory
|
42 |
+
WORKDIR $HOME/app
|
43 |
+
|
44 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
45 |
+
COPY --chown=user . $HOME/app
|
46 |
+
|
47 |
+
#COPY . .
|
48 |
+
|
49 |
+
CMD ["python", "run.py"]
|
50 |
+
|
51 |
+
"MKALIVLGLVLLSVTVQGKVFERCELARTLKRLGMDGYRGIALANWMCLAKWESGYNTRATNYNAGDRSTDYGIFQINSRYWCNDGKTPGAVNACHLSCSALLQDNIADAVACAKRVVRDPQGIRAWVAWRNRCQNRDVRQYVQGCGV"
|
52 |
+
"MKALIVLGLVLLSVTVQGKVFERCELARTLKRLGMDGYRGISLANWMCLAKWESGYNTRATNYNAGDRSTDYGIFQINSRYWCNDGKTPGAVNACHLSCSALLQDNIADAVACAKRVVRDPQGIRAWVAWRNRCQNRDVRQYVQGCGV"
|
requirements.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch==2.0.1
|
2 |
+
gradio==4.16.0
|
3 |
+
torchmetrics==0.9.3
|
4 |
+
pytorch-lightning==2.1.3
|
5 |
+
transformers==4.28.0
|
6 |
+
scikit-learn==1.4.0
|
7 |
+
tabulate==0.9.0
|