Spaces:
Running
Running
更新 Dockerfile,将 HF_Token 输出路径更改为 /home/user/HF_Token,并注释掉 git clone 命令
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -30,11 +30,11 @@ COPY --chown=user . $HOME/app
|
|
30 |
|
31 |
# Get secret EXAMPLE and output it to /test at buildtime
|
32 |
RUN --mount=type=secret,id=HF_Token,mode=0444,required=true \
|
33 |
-
cat /run/secrets/HF_Token > /HF_Token
|
34 |
|
35 |
# Get secret SECRET_EXAMPLE and clone it as repo at buildtime
|
36 |
-
RUN --mount=type=secret,id=HF_Token,mode=0444,required=true \
|
37 |
-
git clone $(cat /run/secrets/HF_Token)
|
38 |
|
39 |
|
40 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
30 |
|
31 |
# Get secret EXAMPLE and output it to /test at buildtime
|
32 |
RUN --mount=type=secret,id=HF_Token,mode=0444,required=true \
|
33 |
+
cat /run/secrets/HF_Token > /home/user/HF_Token
|
34 |
|
35 |
# Get secret SECRET_EXAMPLE and clone it as repo at buildtime
|
36 |
+
#RUN --mount=type=secret,id=HF_Token,mode=0444,required=true \
|
37 |
+
# git clone $(cat /run/secrets/HF_Token)
|
38 |
|
39 |
|
40 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|