Spaces:
Running
on
A10G
Running
on
A10G
aa
Browse files- Dockerfile +8 -11
Dockerfile
CHANGED
@@ -1,20 +1,17 @@
|
|
1 |
FROM ghcr.io/huggingface/text-embeddings-inference:86-1.2
|
2 |
|
3 |
-
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
|
8 |
-
#
|
9 |
-
|
10 |
-
|
11 |
|
12 |
-
#
|
13 |
-
|
14 |
|
15 |
-
# write secret to /home/user/.cache/huggingface/token
|
16 |
-
# first create the file and directory if needed
|
17 |
RUN mkdir -p /home/user/.cache/huggingface
|
18 |
-
# RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true echo $HF_TOKEN > /home/user/.cache/huggingface/token
|
19 |
|
20 |
ENTRYPOINT ["text-embeddings-router", "--model-id", "BAAI/bge-large-en-v1.5", "--hf-api-token", "$HF_TOKEN", "--api-key", "$HF_TOKEN", "--huggingface-hub-cache", "/home/user/.cache/huggingface"]
|
|
|
1 |
FROM ghcr.io/huggingface/text-embeddings-inference:86-1.2
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
|
5 |
+
# Switch to the "user" user
|
6 |
+
USER user
|
7 |
|
8 |
+
# Set home to the user's home directory
|
9 |
+
ENV HOME=/home/user \
|
10 |
+
PATH=/home/user/.local/bin:$PATH
|
11 |
|
12 |
+
# Set the working directory to the user's home directory
|
13 |
+
WORKDIR $HOME/app
|
14 |
|
|
|
|
|
15 |
RUN mkdir -p /home/user/.cache/huggingface
|
|
|
16 |
|
17 |
ENTRYPOINT ["text-embeddings-router", "--model-id", "BAAI/bge-large-en-v1.5", "--hf-api-token", "$HF_TOKEN", "--api-key", "$HF_TOKEN", "--huggingface-hub-cache", "/home/user/.cache/huggingface"]
|