LTEnjoy commited on
Commit
18afa0b
1 Parent(s): d1e787c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +49 -52
Dockerfile CHANGED
@@ -1,52 +1,49 @@
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"
 
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 faiss index
26
+ RUN huggingface-cli download westlake-repl/ProTrek-faiss-index --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"]