parkerjj commited on
Commit
878fde1
·
1 Parent(s): 2a818eb

add HF_Token to Docker

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -0
Dockerfile CHANGED
@@ -27,4 +27,14 @@ WORKDIR $HOME/app
27
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
28
  COPY --chown=user . $HOME/app
29
 
 
 
 
 
 
 
 
 
 
 
30
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
27
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
28
  COPY --chown=user . $HOME/app
29
 
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"]