Maximofn commited on
Commit
d655e0b
·
1 Parent(s): 956e282

Update Dockerfile to handle HuggingFace token secret and adjust port

Browse files

- Add Docker secret mounting for HuggingFace token
- Verify secret file existence with a simple check
- Revert server port back to 8000

Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -9,4 +9,7 @@ COPY . .
9
 
10
  EXPOSE 8000
11
 
12
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
9
 
10
  EXPOSE 8000
11
 
12
+ RUN --mount=type=secret,id=HUGGINGFACE_TOKEN,mode=0444,required=true \
13
+ test -f /run/secrets/HUGGINGFACE_TOKEN && echo "Secret exists!"
14
+
15
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]