Spaces:
Build error
Build error
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
- Dockerfile +4 -1
Dockerfile
CHANGED
|
@@ -9,4 +9,7 @@ COPY . .
|
|
| 9 |
|
| 10 |
EXPOSE 8000
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|