Spaces:
Running
on
A10G
Running
on
A10G
try this
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
@@ -1,20 +1,20 @@
|
|
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 |
-
|
11 |
|
12 |
-
# Set the working directory to the user's home directory
|
13 |
-
WORKDIR $HOME/app
|
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 |
# 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"]
|